mirror of
https://github.com/Tha14/toxic.git
synced 2024-12-23 19:53:25 +01:00
Merge pull request #102 from graboy/master
Incorrectly handled error check for widechars
This commit is contained in:
commit
77db725822
@ -393,14 +393,15 @@ void draw_active_window(Tox *m)
|
||||
|
||||
/* Handle input */
|
||||
#ifdef HAVE_WIDECHAR
|
||||
wget_wch(stdscr, &ch);
|
||||
if (wget_wch(stdscr, &ch) == ERR)
|
||||
#else
|
||||
ch = getch();
|
||||
if ((ch = getch()) == ERR)
|
||||
#endif
|
||||
return;
|
||||
|
||||
if (ch == T_KEY_NEXT || ch == T_KEY_PREV) {
|
||||
set_next_window((int) ch);
|
||||
} else if (ch != ERR) {
|
||||
} else {
|
||||
pthread_mutex_lock(&Winthread.lock);
|
||||
a->onKey(a, m, ch);
|
||||
pthread_mutex_unlock(&Winthread.lock);
|
||||
|
Loading…
Reference in New Issue
Block a user