mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-22 18:36:21 +00:00
Move SIGWINCH handling to ui/core.c, ignore signal whilst resizing
This commit is contained in:
@@ -79,6 +79,8 @@ static char *win_title;
|
||||
|
||||
static int inp_size;
|
||||
|
||||
static gboolean perform_resize = FALSE;
|
||||
|
||||
#ifdef HAVE_LIBXSS
|
||||
static Display *display;
|
||||
#endif
|
||||
@@ -120,6 +122,12 @@ ui_init(void)
|
||||
win_update_virtual(window);
|
||||
}
|
||||
|
||||
void
|
||||
ui_sigwinch_handler(int sig)
|
||||
{
|
||||
perform_resize = TRUE;
|
||||
}
|
||||
|
||||
void
|
||||
ui_update(void)
|
||||
{
|
||||
@@ -137,6 +145,13 @@ ui_update(void)
|
||||
status_bar_update_virtual();
|
||||
inp_put_back();
|
||||
doupdate();
|
||||
|
||||
if (perform_resize) {
|
||||
signal(SIGWINCH, SIG_IGN);
|
||||
ui_resize();
|
||||
perform_resize = FALSE;
|
||||
signal(SIGWINCH, ui_sigwinch_handler);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user