diff --git a/src/profanity.c b/src/profanity.c index 497be90a..64d3eca4 100644 --- a/src/profanity.c +++ b/src/profanity.c @@ -114,7 +114,7 @@ prof_run(const int disable_tls, char *log_level, char *account_name) g_timer_start(timer); } - ui_handle_special_keys(&ch, result, inp, size); + ui_handle_special_keys(&ch, result); #ifdef HAVE_LIBOTR otr_poll(); #endif diff --git a/src/ui/core.c b/src/ui/core.c index e6a4437e..1bf4081b 100644 --- a/src/ui/core.c +++ b/src/ui/core.c @@ -204,7 +204,7 @@ _ui_input_nonblocking(void) } static void -_ui_resize(const int ch, const char * const input, const int size) +_ui_resize(void) { log_info("Resizing UI"); erase(); @@ -212,7 +212,7 @@ _ui_resize(const int ch, const char * const input, const int size) title_bar_resize(); wins_resize_all(); status_bar_resize(); - inp_win_resize(input, size); + inp_win_resize(); ProfWin *window = wins_get_current(); win_update_virtual(window); } @@ -223,6 +223,7 @@ _ui_redraw(void) title_bar_resize(); wins_resize_all(); status_bar_resize(); + inp_win_resize(); } static void @@ -595,13 +596,12 @@ _ui_disconnected(void) } static void -_ui_handle_special_keys(const wint_t * const ch, const int result, const char * const inp, - const int size) +_ui_handle_special_keys(const wint_t * const ch, const int result) { _win_handle_switch(ch); _win_handle_page(ch, result); if (*ch == KEY_RESIZE) { - ui_resize(*ch, inp, size); + ui_resize(); } } diff --git a/src/ui/inputwin.c b/src/ui/inputwin.c index 3fb89979..03211d94 100644 --- a/src/ui/inputwin.c +++ b/src/ui/inputwin.c @@ -90,7 +90,7 @@ create_input_window(void) } void -inp_win_resize(const char * const input, const int size) +inp_win_resize(void) { int inp_x; getmaxyx(stdscr, rows, cols); @@ -104,6 +104,7 @@ inp_win_resize(const char * const input, const int size) } } + wbkgd(inp_win, theme_attrs(THEME_INPUT_TEXT));; _inp_win_update_virtual(); } diff --git a/src/ui/inputwin.h b/src/ui/inputwin.h index 85c75c8e..eae20a51 100644 --- a/src/ui/inputwin.h +++ b/src/ui/inputwin.h @@ -38,7 +38,7 @@ void create_input_window(void); wint_t inp_get_char(char *input, int *size, int *result); void inp_win_reset(void); -void inp_win_resize(const char * input, const int size); +void inp_win_resize(void); void inp_put_back(void); void inp_non_block(void); void inp_block(void); diff --git a/src/ui/ui.h b/src/ui/ui.h index 2b74f38c..7eebac24 100644 --- a/src/ui/ui.h +++ b/src/ui/ui.h @@ -63,11 +63,9 @@ void (*ui_load_colours)(void); void (*ui_update)(void); void (*ui_close)(void); void (*ui_redraw)(void); -void (*ui_resize)(const int ch, const char * const input, - const int size); +void (*ui_resize)(void); GSList* (*ui_get_recipients)(void); -void (*ui_handle_special_keys)(const wint_t * const ch, const int result, const char * const inp, - const int size); +void (*ui_handle_special_keys)(const wint_t * const ch, const int result); gboolean (*ui_switch_win)(const int i); void (*ui_next_win)(void); void (*ui_previous_win)(void);