Fixes a regression from 1d337249f16ed61163315019f5dbbe4db3386390.
Prior to the commit, we were solving this case in a different way. If `IDropTarget::DragOver()` returned `DROPEFFECT_NONE`, `X11DRV_XDND_DROPEFFECTToXdndAction()` would convert it to `XdndActionCopy`.
From: Akihiro Sagawa sagawa.aki@gmail.com
Fixes a regression from 1d337249f16ed61163315019f5dbbe4db3386390.
Prior to the commit, we were solving this case in a different way. If IDropTarget::DragOver() returned DROPEFFECT_NONE, X11DRV_XDND_DROPEFFECTToXdndAction() would convert it to XdndActionCopy.
Wine-Bugs: https://bugs.winehq.org/show_bug.cgi?id=55179 --- dlls/winex11.drv/xdnd.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/dlls/winex11.drv/xdnd.c b/dlls/winex11.drv/xdnd.c index ce99941c021..15bb4d89cbe 100644 --- a/dlls/winex11.drv/xdnd.c +++ b/dlls/winex11.drv/xdnd.c @@ -163,6 +163,7 @@ static HWND window_accepting_files(HWND hwnd) * x11drv_dnd_position_event * * Handle an XdndPosition event. + * Should return the DROPEFFECT_xxxx value instead of the NTSTATUS one. */ NTSTATUS WINAPI x11drv_dnd_position_event( void *arg, ULONG size ) { @@ -233,7 +234,7 @@ NTSTATUS WINAPI x11drv_dnd_position_event( void *arg, ULONG size ) } }
- if (XDNDAccepted) + if (XDNDAccepted && XDNDDropEffect != DROPEFFECT_NONE) accept = 1; else { @@ -246,7 +247,7 @@ NTSTATUS WINAPI x11drv_dnd_position_event( void *arg, ULONG size ) } }
- return accept ? effect : 0; + return accept ? effect : DROPEFFECT_NONE; }
NTSTATUS x11drv_dnd_drop_event( UINT arg ) @@ -319,7 +320,7 @@ NTSTATUS x11drv_dnd_drop_event( UINT arg ) TRACE("effectRequested(0x%lx) accept(%d) performed(0x%lx) at x(%ld),y(%ld)\n", XDNDDropEffect, accept, effect, XDNDxy.x, XDNDxy.y);
- return accept ? effect : 0; + return accept ? effect : DROPEFFECT_NONE; }
/**************************************************************************
Jacek Caban (@jacek) commented about dlls/winex11.drv/xdnd.c:
x11drv_dnd_position_event
- Handle an XdndPosition event.
- Should return the DROPEFFECT_xxxx value instead of the NTSTATUS one.
Please drop this comment. We actually want callbacks to return NTSTATUS eventually, but for this particular case, it would be even better to move the callback out of winex11.
Anyway, it's unrelated to the rest of this patch, looks good otherwise, thanks.