This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


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

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] ioemu: pump SDL events on resize
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 02 May 2008 06:00:14 -0700
Delivery-date: Fri, 02 May 2008 06:00:19 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# 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,
     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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] ioemu: pump SDL events on resize, Xen patchbot-unstable <=