ia64/xen-unstable

changeset 17567:26f394079b6c

ioemu: pump SDL events on resize

When sdl_resize resizes the SDL window, some window manager send back
a ConfigureNotify event, which triggers a SDL_VIDEORESIZE event. That
event, however, is seen only much later, on the next VGA refresh
round. If the guest quickly switches to another resolution in between,
the SDL_VIDEORESIZE event makes us erroneously rescale that new
resolution into the old one.

This patch makes us pump that window manager event, so that no
SDL_VIDEORESIZE event is generated.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Fri May 02 13:47:46 2008 +0100 (2008-05-02)
parents 1f24743354ea
children e309f53f3f83
files tools/ioemu/sdl.c
line diff
     1.1 --- a/tools/ioemu/sdl.c	Fri May 02 13:47:01 2008 +0100
     1.2 +++ b/tools/ioemu/sdl.c	Fri May 02 13:47:46 2008 +0100
     1.3 @@ -235,6 +235,9 @@ static void sdl_resize(DisplayState *ds,
     1.4   again:
     1.5      screen = SDL_SetVideoMode(w, h, 0, flags);
     1.6  
     1.7 +    /* Process any WM-generated resize event */
     1.8 +    SDL_PumpEvents();
     1.9 +
    1.10      if (!screen) {
    1.11          fprintf(stderr, "Could not open SDL display: %s\n", SDL_GetError());
    1.12          if (opengl_enabled) {