1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-07-21 18:24:14 -04:00

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
This commit is contained in:
Michael Vetter 2019-12-02 14:03:53 +01:00
parent 09b8802f51
commit 19de066008
2 changed files with 3 additions and 2 deletions

View File

@ -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();
}

View File

@ -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();