Alexandre Julliard : winex11: Improved handling of broken 8-bit TARGETS selection.
Alexandre Julliard
julliard at winehq.org
Tue Apr 8 06:38:18 CDT 2008
Module: wine
Branch: master
Commit: 828ac88f24e96537a28bf30f055cfef264268a87
URL: http://source.winehq.org/git/wine.git/?a=commit;h=828ac88f24e96537a28bf30f055cfef264268a87
Author: Alexandre Julliard <julliard at winehq.org>
Date: Tue Apr 8 12:24:54 2008 +0200
winex11: Improved handling of broken 8-bit TARGETS selection.
---
dlls/winex11.drv/clipboard.c | 18 ++++++++++++++++--
1 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/dlls/winex11.drv/clipboard.c b/dlls/winex11.drv/clipboard.c
index 2404a71..cdf54c1 100644
--- a/dlls/winex11.drv/clipboard.c
+++ b/dlls/winex11.drv/clipboard.c
@@ -1902,8 +1902,22 @@ static int X11DRV_CLIPBOARD_QueryAvailableData(LPCLIPBOARDINFO lpcbinfo)
* The TARGETS property should have returned us a list of atoms
* corresponding to each selection target format supported.
*/
- if (aformat == 32 && (atype == XA_ATOM || atype == x11drv_atom(TARGETS)))
- X11DRV_CLIPBOARD_InsertSelectionProperties(display, targetList, cSelectionTargets);
+ if (atype == XA_ATOM || atype == x11drv_atom(TARGETS))
+ {
+ if (aformat == 32)
+ {
+ X11DRV_CLIPBOARD_InsertSelectionProperties(display, targetList, cSelectionTargets);
+ }
+ else if (aformat == 8) /* work around quartz-wm brain damage */
+ {
+ unsigned long i, count = cSelectionTargets / sizeof(CARD32);
+ Atom *atoms = HeapAlloc( GetProcessHeap(), 0, count * sizeof(Atom) );
+ for (i = 0; i < count; i++)
+ atoms[i] = ((CARD32 *)targetList)[i]; /* FIXME: byte swapping */
+ X11DRV_CLIPBOARD_InsertSelectionProperties( display, atoms, count );
+ HeapFree( GetProcessHeap(), 0, atoms );
+ }
+ }
/* Free the list of targets */
wine_tsx11_lock();
More information about the wine-cvs
mailing list