diff --git a/src/ChangeLog b/src/ChangeLog index ea5391c92..f784929bf 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2006-11-08 Egmont Koblinger + + * key.c (get_event): Eliminate timeouts on window resize event. + * layout.c (change_screen_size): Set winch_flag to 0 on entrance not + exit of function. + 2006-09-25 Pavel Tsekov * layout.c (layout_do_change): Remove global variable. diff --git a/src/key.c b/src/key.c index feed1fca2..acfb69996 100644 --- a/src/key.c +++ b/src/key.c @@ -36,6 +36,7 @@ #include "tty.h" #include "mouse.h" #include "key.h" +#include "layout.h" /* winch_flag */ #include "main.h" #include "win.h" #include "cons.saver.h" @@ -1073,7 +1074,7 @@ get_event (struct Gpm_Event *event, int redo_event, int block) time_addr = NULL; } - if (!block) { + if (!block || winch_flag) { time_addr = &timeout; timeout.tv_sec = 0; timeout.tv_usec = 0; @@ -1090,7 +1091,7 @@ get_event (struct Gpm_Event *event, int redo_event, int block) if (flag == 0) { if (redo_event) return EV_MOUSE; - if (!block) + if (!block || winch_flag) return EV_NONE; vfs_timeout_handler (); } diff --git a/src/layout.c b/src/layout.c index 21127d428..96685872d 100644 --- a/src/layout.c +++ b/src/layout.c @@ -761,6 +761,7 @@ low_level_change_screen_size (void) void change_screen_size (void) { + winch_flag = 0; #if defined(HAVE_SLANG) || NCURSES_VERSION_MAJOR >= 4 #if defined TIOCGWINSZ @@ -793,7 +794,6 @@ change_screen_size (void) touchwin (stdscr); #endif /* TIOCGWINSZ */ #endif /* defined(HAVE_SLANG) || NCURSES_VERSION_MAJOR >= 4 */ - winch_flag = 0; } static int ok_to_refresh = 1;