mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-06 05:21:08 +00:00
winex11: Improved handling of broken 8-bit TARGETS selection.
This commit is contained in:
parent
28553fa8a7
commit
828ac88f24
|
@ -1902,8 +1902,22 @@ static int X11DRV_CLIPBOARD_QueryAvailableData(LPCLIPBOARDINFO lpcbinfo)
|
||||||
* The TARGETS property should have returned us a list of atoms
|
* The TARGETS property should have returned us a list of atoms
|
||||||
* corresponding to each selection target format supported.
|
* corresponding to each selection target format supported.
|
||||||
*/
|
*/
|
||||||
if (aformat == 32 && (atype == XA_ATOM || atype == x11drv_atom(TARGETS)))
|
if (atype == XA_ATOM || atype == x11drv_atom(TARGETS))
|
||||||
X11DRV_CLIPBOARD_InsertSelectionProperties(display, targetList, cSelectionTargets);
|
{
|
||||||
|
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 */
|
/* Free the list of targets */
|
||||||
wine_tsx11_lock();
|
wine_tsx11_lock();
|
||||||
|
|
Loading…
Reference in a new issue