diff --git a/src/ui/core.c b/src/ui/core.c index 855c600c..5b621ba1 100644 --- a/src/ui/core.c +++ b/src/ui/core.c @@ -179,6 +179,12 @@ ui_get_char(char *input, int *size) { int result = 0; wint_t ch = inp_get_char(input, size, &result); + _win_handle_switch(ch); + _win_handle_page(ch, result); + if (ch == KEY_RESIZE) { + ui_resize(); + } + if (ch != ERR && result != ERR) { ui_reset_idle_time(); ui_input_nonblocking(TRUE); @@ -186,8 +192,6 @@ ui_get_char(char *input, int *size) ui_input_nonblocking(FALSE); } - ui_handle_special_keys(ch, result); - return ch; } @@ -704,16 +708,6 @@ ui_disconnected(void) ui_hide_roster(); } -void -ui_handle_special_keys(const wint_t ch, const int result) -{ - _win_handle_switch(ch); - _win_handle_page(ch, result); - if (ch == KEY_RESIZE) { - ui_resize(); - } -} - void ui_close_connected_win(int index) { diff --git a/src/ui/ui.h b/src/ui/ui.h index 600f7fe0..8c9690d6 100644 --- a/src/ui/ui.h +++ b/src/ui/ui.h @@ -61,7 +61,6 @@ void ui_close(void); void ui_redraw(void); void ui_resize(void); GSList* ui_get_chat_recipients(void); -void ui_handle_special_keys(const wint_t ch, const int result); gboolean ui_switch_win(const int i); void ui_next_win(void); void ui_previous_win(void); diff --git a/tests/ui/stub_ui.c b/tests/ui/stub_ui.c index a4130279..cee10aa9 100644 --- a/tests/ui/stub_ui.c +++ b/tests/ui/stub_ui.c @@ -64,8 +64,6 @@ GSList* ui_get_chat_recipients(void) return NULL; } -void ui_handle_special_keys(const wint_t ch, const int result) {} - gboolean ui_switch_win(const int i) { check_expected(i);