From 19de066008c69b24cc3d64a8781089e56d416a53 Mon Sep 17 00:00:00 2001 From: Michael Vetter Date: Mon, 2 Dec 2019 14:03:53 +0100 Subject: Call ncurses resize function before move function From @xaizek s comment on issue #1235: ``` If the move would cause the window to be off the screen, it is an error and the window is not moved. Resize on the other hand doesn't fail like this according to its documentation. So new size needs to be applied first. ``` Big thanks to @xaizek for taking a look at our code and helping us!! Regards https://github.com/profanity-im/profanity/issues/1235 --- src/ui/statusbar.c | 2 +- src/ui/titlebar.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/ui/statusbar.c b/src/ui/statusbar.c index 39b1ddbb..8f9900e1 100644 --- a/src/ui/statusbar.c +++ b/src/ui/statusbar.c @@ -137,8 +137,8 @@ status_bar_resize(void) int cols = getmaxx(stdscr); werase(statusbar_win); int row = screen_statusbar_row(); - mvwin(statusbar_win, row, 0); wresize(statusbar_win, 1, cols); + mvwin(statusbar_win, row, 0); status_bar_draw(); } diff --git a/src/ui/titlebar.c b/src/ui/titlebar.c index 9cb2cfec..50b85932 100644 --- a/src/ui/titlebar.c +++ b/src/ui/titlebar.c @@ -108,9 +108,10 @@ title_bar_resize(void) werase(win); int row = screen_titlebar_row(); - mvwin(win, row, 0); wresize(win, 1, cols); + mvwin(win, row, 0); + wbkgd(win, theme_attrs(THEME_TITLE_TEXT)); _title_bar_draw(); -- cgit 1.4.1-2-gfad0