[PATCH 19/19] Xephyr: only act on expose events if count is 0

Julien Cristau jcristau at debian.org
Wed Oct 20 10:12:01 PDT 2010


Suggested-by: Peter Harris
Signed-off-by: Julien Cristau <jcristau at debian.org>
---
 hw/kdrive/ephyr/hostx.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/hw/kdrive/ephyr/hostx.c b/hw/kdrive/ephyr/hostx.c
index 5ce5c4c..5734bd3 100644
--- a/hw/kdrive/ephyr/hostx.c
+++ b/hw/kdrive/ephyr/hostx.c
@@ -986,6 +986,11 @@ hostx_get_event(EphyrHostXEvent *ev)
 	    xcb_expose_event_t *expose = (xcb_expose_event_t *)xev;
 	    struct EphyrHostScreen *host_screen =
                 host_screen_from_window (expose->window);
+	    while (expose->count > 0) {
+	      free(xev);
+	      xev = xcb_wait_for_event(HostX.conn);
+	      expose = (xcb_expose_event_t *)xev;
+	    }
             if (host_screen)
               {
                 hostx_paint_rect (host_screen->info, 0, 0, 0, 0,
-- 
1.7.1



More information about the xorg-devel mailing list