Ken Thomases : winex11.drv: Accomodate XGetWindowProperty returning an actual format of something other than 32 for the TARGETS property .

Alexandre Julliard julliard at winehq.org
Fri Jan 25 07:06:09 CST 2008


Module: wine
Branch: master
Commit: a30327afef7b08d1aac1943ded64ee363a61c537
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=a30327afef7b08d1aac1943ded64ee363a61c537

Author: Ken Thomases <ken at codeweavers.com>
Date:   Fri Jan 25 12:20:39 2008 +0000

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

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();




More information about the wine-cvs mailing list