1
0
mirror of https://github.com/Tha14/toxic.git synced 2024-06-29 14:27:45 +02:00

use proper variable type for sig handler flags

This commit is contained in:
Jfreegman 2014-09-22 14:27:33 -04:00
parent c07c0028bb
commit 3c74385f5c
No known key found for this signature in database
GPG Key ID: 3627F3144076AE63
2 changed files with 6 additions and 5 deletions

View File

@ -92,7 +92,7 @@ static struct _user_password {
static void catch_SIGINT(int sig)
{
Winthread.sig_exit_toxic = true;
Winthread.sig_exit_toxic = 1;
}
static void catch_SIGSEGV(int sig)
@ -105,7 +105,7 @@ static void catch_SIGSEGV(int sig)
static void flag_window_resize(int sig)
{
Winthread.flag_resize = true;
Winthread.flag_resize = 1;
}
static void init_signal_catchers(void)
@ -727,7 +727,7 @@ void *thread_winref(void *data)
if (Winthread.flag_resize) {
on_window_resize();
Winthread.flag_resize = false;
Winthread.flag_resize = 0;
} else if (draw_count >= INACTIVE_WIN_REFRESH_RATE) {
refresh_inactive_windows();
draw_count = 0;

View File

@ -26,6 +26,7 @@
#include <pthread.h>
#include <wctype.h>
#include <wchar.h>
#include <signal.h>
#include <tox/tox.h>
@ -67,8 +68,8 @@ typedef enum {
struct _Winthread {
pthread_t tid;
pthread_mutex_t lock;
bool sig_exit_toxic;
bool flag_resize;
volatile sig_atomic_t sig_exit_toxic;
volatile sig_atomic_t flag_resize;
};
struct _cqueue_thread {