[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] ioemu: pump SDL events on resize



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1209732466 -3600
# Node ID 26f394079b6cca2010c2567fcd73d2e14b1be43d
# Parent  1f24743354ea85d3c6485c986522cb1698169bd1
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@xxxxxxxxxxxxx>
---
 tools/ioemu/sdl.c |    3 +++
 1 files changed, 3 insertions(+)

diff -r 1f24743354ea -r 26f394079b6c tools/ioemu/sdl.c
--- a/tools/ioemu/sdl.c Fri May 02 13:47:01 2008 +0100
+++ b/tools/ioemu/sdl.c Fri May 02 13:47:46 2008 +0100
@@ -234,6 +234,9 @@ static void sdl_resize(DisplayState *ds,
 
  again:
     screen = SDL_SetVideoMode(w, h, 0, flags);
+
+    /* Process any WM-generated resize event */
+    SDL_PumpEvents();
 
     if (!screen) {
         fprintf(stderr, "Could not open SDL display: %s\n", SDL_GetError());

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.