1
0
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:
Jfreegman
2015-08-27 21:29:34 -04:00
parent 28dd43608d
commit b4464eda4d
8 changed files with 187 additions and 104 deletions

View File

@ -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;