GNOME Bugzilla – Bug 148528
on win32 gdk_drag_find_window_for_screen doesn't work with certain desktop layouts
Last modified: 2004-12-22 21:47:04 UTC
There are two possible ways to reproduce this bug: 1. Place your start bar at the top (or left) of the screen. 2. Have multiple monitors where the primary monitor is not at the top left of the virtual desktop. The drag and drop fails because in two different places GTK and GDK are comparing coordinates in one coordinate system with coordinates in another. One half of that gdk_window_get_origin seems returns values reltive to the primary dsektop and all other coordinates seem to be relative to the virtual desktop (bug #148526). The other half is in gdkdnd-win32.c where it does something similar iternally when searching for the dnd target window.
Created attachment 29913 [details] [review] Patch against gtk+-2.4.1 This patch fixes a bug in gdk/win32/gdkdnd-win32.c and works around bug #148526 by modifying gtk/gtkdnd.c
Modifying one part of GTK+ to work around a bug in another part is never right. The change in gdkdnd-win32.c doesn't look right either - all coordinates should be absolute there, not screen relative. *** This bug has been marked as a duplicate of 148526 ***
Created attachment 29972 [details] [review] improved patch that fixes just the bug in gdkdnd-win32.c
This new patch fixes just the bug in gdkdnd-win32.c, which is different than bug #148526. The new patch leaves coordinates in absolute coordinates (i.e. relative to the entire virtual desktop) as much as possible, with the restriction that ScreenToClient does not operate in that coordinate space.
Have you checked that this isn't the same as bug #141842?
Yes, it is the same. Sorry. *** This bug has been marked as a duplicate of 141842 ***