[PATCH] winex11.drv: Accomodate XGetWindowProperty returning an actual format of something other than 32 for the TARGETS property.

Ken Thomases ken at codeweavers.com
Fri Jan 25 06:20:39 CST 2008


We shouldn't care what format the property was set with, as long as we trust that the property is an atom type.
---
 dlls/winex11.drv/clipboard.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/winex11.drv/clipboard.c b/dlls/winex11.drv/clipboard.c
index 7731ae0..453746f 100644
--- a/dlls/winex11.drv/clipboard.c
+++ b/dlls/winex11.drv/clipboard.c
@@ -1903,8 +1903,8 @@ 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 ((atype == XA_ATOM || atype == x11drv_atom(TARGETS)) && aformat == 32)
-           X11DRV_CLIPBOARD_InsertSelectionProperties(display, targetList, cSelectionTargets);
+       if (atype == XA_ATOM || atype == x11drv_atom(TARGETS))
+           X11DRV_CLIPBOARD_InsertSelectionProperties(display, targetList, (cSelectionTargets * aformat / (8 * sizeof(Atom))));
 
        /* Free the list of targets */
        wine_tsx11_lock();
-- 
1.5.3.GIT


--------------040207050203010604080305--



More information about the wine-patches mailing list