mirror of
https://github.com/Tha14/toxic.git
synced 2025-06-28 18:26:46 +02:00
Fix more threading issues
This commit is contained in:
@ -454,10 +454,16 @@ void on_window_resize(void)
|
||||
|
||||
static void draw_window_tab(ToxWindow *toxwin)
|
||||
{
|
||||
pthread_mutex_lock(&Winthread.lock);
|
||||
if (toxwin->alert != WINDOW_ALERT_NONE) attron(COLOR_PAIR(toxwin->alert));
|
||||
pthread_mutex_unlock(&Winthread.lock);
|
||||
|
||||
clrtoeol();
|
||||
printw(" [%s]", toxwin->name);
|
||||
|
||||
pthread_mutex_lock(&Winthread.lock);
|
||||
if (toxwin->alert != WINDOW_ALERT_NONE) attroff(COLOR_PAIR(toxwin->alert));
|
||||
pthread_mutex_unlock(&Winthread.lock);
|
||||
}
|
||||
|
||||
static void draw_bar(void)
|
||||
@ -505,7 +511,10 @@ static void draw_bar(void)
|
||||
void draw_active_window(Tox *m)
|
||||
{
|
||||
ToxWindow *a = active_window;
|
||||
|
||||
pthread_mutex_lock(&Winthread.lock);
|
||||
a->alert = WINDOW_ALERT_NONE;
|
||||
pthread_mutex_unlock(&Winthread.lock);
|
||||
|
||||
wint_t ch = 0;
|
||||
|
||||
|
Reference in New Issue
Block a user