Damjan Jovanovic : winex11.drv: Filter out all CF_* formats when CF_HDROP is present.
Alexandre Julliard
julliard at winehq.org
Tue Aug 17 11:31:19 CDT 2010
Module: wine
Branch: master
Commit: 6871341c3c70c0054963d8fd9506e1aa71356293
URL: http://source.winehq.org/git/wine.git/?a=commit;h=6871341c3c70c0054963d8fd9506e1aa71356293
Author: Damjan Jovanovic <damjan.jov at gmail.com>
Date: Mon Aug 16 21:08:49 2010 +0200
winex11.drv: Filter out all CF_* formats when CF_HDROP is present.
---
dlls/winex11.drv/xdnd.c | 27 +++++++++++++++++++++++++++
1 files changed, 27 insertions(+), 0 deletions(-)
diff --git a/dlls/winex11.drv/xdnd.c b/dlls/winex11.drv/xdnd.c
index ef8dd99..f0704da 100644
--- a/dlls/winex11.drv/xdnd.c
+++ b/dlls/winex11.drv/xdnd.c
@@ -257,6 +257,8 @@ static void X11DRV_XDND_ResolveProperty(Display *display, Window xwin, Time tm,
unsigned long bytesret, icount;
int entries = 0;
unsigned char* data = NULL;
+ XDNDDATA *current, *next;
+ BOOL haveHDROP = FALSE;
TRACE("count(%ld)\n", *count);
@@ -301,6 +303,31 @@ static void X11DRV_XDND_ResolveProperty(Display *display, Window xwin, Time tm,
wine_tsx11_unlock();
}
+ /* On Windows when there is a CF_HDROP, there are no other CF_ formats.
+ * foobar2000 relies on this (spaces -> %20's without it).
+ */
+ LIST_FOR_EACH_ENTRY(current, &xdndData, XDNDDATA, entry)
+ {
+ if (current->cf_win == CF_HDROP)
+ {
+ haveHDROP = TRUE;
+ break;
+ }
+ }
+ if (haveHDROP)
+ {
+ LIST_FOR_EACH_ENTRY_SAFE(current, next, &xdndData, XDNDDATA, entry)
+ {
+ if (current->cf_win != CF_HDROP && current->cf_win < CF_MAX)
+ {
+ list_remove(¤t->entry);
+ HeapFree(GetProcessHeap(), 0, current->data);
+ HeapFree(GetProcessHeap(), 0, current);
+ --entries;
+ }
+ }
+ }
+
*count = entries;
}
More information about the wine-cvs
mailing list