clipboard cleanup
Ulrich Czekalla
ulrich.czekalla at utoronto.ca
Mon Feb 28 13:01:06 CST 2005
If an unexpected condition occurs I'd rather it continue to fail and have
users report a bug than hide it by resetting the owner.
ChangeLog:
Ulrich Czekalla <ulrich at codeweavers.com>
If unexpected condition occurs just report an error
-------------- next part --------------
Index: dlls/x11drv/clipboard.c
===================================================================
RCS file: /home/wine/wine/dlls/x11drv/clipboard.c,v
retrieving revision 1.33
diff -u -p -r1.33 clipboard.c
--- dlls/x11drv/clipboard.c 26 Feb 2005 17:49:38 -0000 1.33
+++ dlls/x11drv/clipboard.c 28 Feb 2005 18:53:54 -0000
@@ -1610,26 +1610,7 @@ static int X11DRV_CLIPBOARD_QueryAvailab
{
ERR("Received request to cache selection but process is owner=(%08x)\n",
(unsigned) selectionWindow);
-
- selectionAcquired = S_NOSELECTION;
-
- wine_tsx11_lock();
- if (XGetSelectionOwner(display,XA_PRIMARY) == selectionWindow)
- selectionAcquired |= S_PRIMARY;
-
- if (XGetSelectionOwner(display,x11drv_atom(CLIPBOARD)) == selectionWindow)
- selectionAcquired |= S_CLIPBOARD;
- wine_tsx11_unlock();
-
- if (!(selectionAcquired == (S_PRIMARY | S_CLIPBOARD)))
- {
- WARN("Lost selection but process didn't process SelectClear\n");
- selectionWindow = None;
- }
- else
- {
- return -1; /* Prevent self request */
- }
+ return -1; /* Prevent self request */
}
if (lpcbinfo->flags & CB_OWNER)
@@ -2175,23 +2156,7 @@ void X11DRV_AcquireClipboard(HWND hWndCl
}
else
{
- WARN("Received request to acquire selection but process is already owner=(%08x)\n", (unsigned) selectionWindow);
-
- selectionAcquired = S_NOSELECTION;
-
- wine_tsx11_lock();
- if (XGetSelectionOwner(display,XA_PRIMARY) == selectionWindow)
- selectionAcquired |= S_PRIMARY;
-
- if (XGetSelectionOwner(display,x11drv_atom(CLIPBOARD)) == selectionWindow)
- selectionAcquired |= S_CLIPBOARD;
- wine_tsx11_unlock();
-
- if (!(selectionAcquired == (S_PRIMARY | S_CLIPBOARD)))
- {
- WARN("Lost selection but process didn't process SelectClear\n");
- selectionWindow = None;
- }
+ ERR("Received request to acquire selection but process is already owner=(%08x)\n", (unsigned) selectionWindow);
}
}
More information about the wine-patches
mailing list