mirror of
https://github.com/Tha14/toxic.git
synced 2024-12-23 07:13:25 +01:00
use proper variable type for sig handler flags
This commit is contained in:
parent
c07c0028bb
commit
3c74385f5c
@ -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;
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user