Vincent Povirk : winex11.drv: Don' t use XEvents uninitialized when waits time out.
Alexandre Julliard
julliard at winehq.org
Thu Jun 4 07:59:32 CDT 2009
Module: wine
Branch: master
Commit: cedc8e709914b3fb9584fd5194c5e40983efa9db
URL: http://source.winehq.org/git/wine.git/?a=commit;h=cedc8e709914b3fb9584fd5194c5e40983efa9db
Author: Vincent Povirk <vincent at codeweavers.com>
Date: Wed Jun 3 08:54:22 2009 -0500
winex11.drv: Don't use XEvents uninitialized when waits time out.
---
dlls/winex11.drv/clipboard.c | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/dlls/winex11.drv/clipboard.c b/dlls/winex11.drv/clipboard.c
index f14a84c..b634451 100644
--- a/dlls/winex11.drv/clipboard.c
+++ b/dlls/winex11.drv/clipboard.c
@@ -1842,6 +1842,11 @@ static BOOL X11DRV_CLIPBOARD_QueryTargets(Display *display, Window w, Atom selec
usleep(SELECTION_WAIT);
}
+ if (i == SELECTION_RETRIES)
+ {
+ ERR("Timed out waiting for SelectionNotify event\n");
+ return FALSE;
+ }
/* Verify that the selection returned a valid TARGETS property */
if ((xe->xselection.target != target) || (xe->xselection.property == None))
{
@@ -2111,8 +2116,12 @@ static BOOL X11DRV_CLIPBOARD_ReadSelectionData(Display *display, LPWINE_CLIPDATA
usleep(SELECTION_WAIT);
}
+ if (i == SELECTION_RETRIES)
+ {
+ ERR("Timed out waiting for SelectionNotify event\n");
+ }
/* Verify that the selection returned a valid TARGETS property */
- if (xe.xselection.property != None)
+ else if (xe.xselection.property != None)
{
/*
* Read the contents of the X selection property
More information about the wine-cvs
mailing list