winex11.drv: Flush property notify events before deleting properties.

Vincent Povirk madewokherd at gmail.com
Thu Jan 3 17:04:38 CST 2013


-------------- next part --------------
From 7213198acbb01ffdede296abfe240afdeaaca384 Mon Sep 17 00:00:00 2001
From: Vincent Povirk <vincent at codeweavers.com>
Date: Thu, 3 Jan 2013 17:00:40 -0600
Subject: [PATCH 2/2] winex11.drv: Flush property notify events before
 deleting properties.

As soon as we delete an INCR property, we could get a PropertyNotify event
containing the first piece of data. Flushing afterwards could cause us to
lose that event.
---
 dlls/winex11.drv/clipboard.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/dlls/winex11.drv/clipboard.c b/dlls/winex11.drv/clipboard.c
index 1da3a22..0df355a 100644
--- a/dlls/winex11.drv/clipboard.c
+++ b/dlls/winex11.drv/clipboard.c
@@ -2360,12 +2360,12 @@ static BOOL X11DRV_CLIPBOARD_ReadProperty(Display *display, Window w, Atom prop,
     if (prop == None)
         return FALSE;
 
-    if (!X11DRV_CLIPBOARD_GetProperty(display, w, prop, &atype, data, datasize))
-        return FALSE;
-
     while (XCheckTypedWindowEvent(display, w, PropertyNotify, &xe))
         ;
 
+    if (!X11DRV_CLIPBOARD_GetProperty(display, w, prop, &atype, data, datasize))
+        return FALSE;
+
     if (atype == x11drv_atom(INCR))
     {
         unsigned char *buf = *data;
-- 
1.8.0


More information about the wine-patches mailing list