Reduce flicker when resizing in option menus
Do not update the main windows when resizing the terminal in the general options menu or in the notification options menu. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
This commit is contained in:
parent
5eea05a203
commit
05ba450c3b
@ -1093,6 +1093,7 @@ void wins_get_config(void);
|
|||||||
void wins_update_border(int);
|
void wins_update_border(int);
|
||||||
void wins_update_panels(int);
|
void wins_update_panels(int);
|
||||||
void wins_update(int);
|
void wins_update(int);
|
||||||
|
void wins_reset_noupdate(void);
|
||||||
void wins_reset(void);
|
void wins_reset(void);
|
||||||
void wins_prepare_external(void);
|
void wins_prepare_external(void);
|
||||||
void wins_unprepare_external(void);
|
void wins_unprepare_external(void);
|
||||||
|
@ -802,7 +802,7 @@ void custom_general_config(void)
|
|||||||
|
|
||||||
if (resize) {
|
if (resize) {
|
||||||
resize = 0;
|
resize = 0;
|
||||||
wins_reset();
|
wins_reset_noupdate();
|
||||||
listbox_resize(&lb, 0, 0, notify_bar() ? row - 3 : row - 2, col);
|
listbox_resize(&lb, 0, 0, notify_bar() ? row - 3 : row - 2, col);
|
||||||
listbox_draw_deco(&lb);
|
listbox_draw_deco(&lb);
|
||||||
delwin(win[STA].p);
|
delwin(win[STA].p);
|
||||||
|
@ -786,7 +786,7 @@ void notify_config_bar(void)
|
|||||||
if (resize) {
|
if (resize) {
|
||||||
resize = 0;
|
resize = 0;
|
||||||
wins_get_config();
|
wins_get_config();
|
||||||
wins_reset();
|
wins_reset_noupdate();
|
||||||
listbox_resize(&lb, 0, 0, notify_bar() ? row - 3 : row - 2, col);
|
listbox_resize(&lb, 0, 0, notify_bar() ? row - 3 : row - 2, col);
|
||||||
listbox_draw_deco(&lb);
|
listbox_draw_deco(&lb);
|
||||||
delwin(win[STA].p);
|
delwin(win[STA].p);
|
||||||
|
@ -584,12 +584,18 @@ void wins_update(int flags)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Reset the screen, needed when resizing terminal for example. */
|
/* Reset the screen, needed when resizing terminal for example. */
|
||||||
void wins_reset(void)
|
void wins_reset_noupdate(void)
|
||||||
{
|
{
|
||||||
endwin();
|
endwin();
|
||||||
wins_refresh();
|
wins_refresh();
|
||||||
curs_set(0);
|
curs_set(0);
|
||||||
wins_reinit();
|
wins_reinit();
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Reset the screen, needed when resizing terminal for example. */
|
||||||
|
void wins_reset(void)
|
||||||
|
{
|
||||||
|
wins_reset_noupdate();
|
||||||
wins_update(FLAG_ALL);
|
wins_update(FLAG_ALL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user