1
0
mirror of https://github.com/Tha14/toxic.git synced 2024-07-01 16:37:46 +02:00

Repaired window switching after widechar fix

This commit is contained in:
Grayson MacKenzie 2014-03-30 16:42:27 -04:00
parent cce7892d94
commit f8a4312fdd

View File

@ -397,12 +397,14 @@ void draw_active_window(Tox *m)
bool ltr; bool ltr;
#ifdef HAVE_WIDECHAR #ifdef HAVE_WIDECHAR
int status = wget_wch(stdscr, &ch); int status = wget_wch(stdscr, &ch);
if (status == OK)
ltr = true; if (status == ERR)
else if (status == KEY_CODE_YES)
ltr = false;
else
return; return;
if (status == OK)
ltr = iswprint(ch);
else /* if (status == KEY_CODE_YES) */
ltr = false;
#else #else
ch = getch(); ch = getch();
@ -413,7 +415,7 @@ void draw_active_window(Tox *m)
ltr = isprint(ch); ltr = isprint(ch);
#endif #endif
if (ltr && (ch == T_KEY_NEXT || ch == T_KEY_PREV) ) { if (!ltr && (ch == T_KEY_NEXT || ch == T_KEY_PREV) ) {
set_next_window((int) ch); set_next_window((int) ch);
} else { } else {
pthread_mutex_lock(&Winthread.lock); pthread_mutex_lock(&Winthread.lock);