All of lore.kernel.org
 help / color / mirror / Atom feed
From: Samuel Thibault <samuel.thibault@eu.citrix.com>
To: xen-devel <xen-devel@lists.xensource.com>
Subject: [PATCH] ioemu: pump SDL events on resize
Date: Fri, 2 May 2008 11:21:33 +0100	[thread overview]
Message-ID: <20080502102133.GA4819@implementation.uk.xensource.com> (raw)

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>

diff -r 7190027c2da8 tools/ioemu/sdl.c
--- a/tools/ioemu/sdl.c	Thu May 01 18:56:04 2008 +0100
+++ b/tools/ioemu/sdl.c	Fri May 02 10:38:33 2008 +0100
@@ -294,6 +294,9 @@ static void sdl_resize(DisplayState *ds,
         };
 #endif
     }
+
+    /* Process any WM-generated resize event */
+    SDL_PumpEvents();
 }
 
 static void sdl_colourdepth(DisplayState *ds, int depth)

             reply	other threads:[~2008-05-02 10:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-02 10:21 Samuel Thibault [this message]
2008-05-02 10:23 ` [PATCH] ioemu: pump SDL events on resize Samuel Thibault

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080502102133.GA4819@implementation.uk.xensource.com \
    --to=samuel.thibault@eu.citrix.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.