* 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.
This commit is contained in:
Leonard den Ottolander 2006-11-08 13:37:24 +00:00
parent 16bf1ca415
commit 4c9ca90e8a
3 changed files with 10 additions and 3 deletions

View File

@ -1,3 +1,9 @@
2006-11-08 Egmont Koblinger <egmont@uhulinux.hu>
* 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 <ptsekov@gmx.net>
* layout.c (layout_do_change): Remove global variable.

View File

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

View File

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