mirror of
https://github.com/Tha14/toxic.git
synced 2024-11-23 11:33:01 +01:00
Repaired window switching after widechar fix
This commit is contained in:
parent
cce7892d94
commit
f8a4312fdd
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user