GNOME Bugzilla – Bug 341166
Allow WMs to raise potential drag-targets during DND
Last modified: 2015-03-08 14:04:23 UTC
See bug 112308 for the corresponding metacity bug report. Basically, the WM needs to know when the mouse enters (and maybe leaves) various toplevel windows. I implemented this in gdk by changing the event mask of such events. That might be the wrong way to implement this, given bug 112308 comment 3 and bug 81543, but I don't fully understand those comments and whether they're applicable here. Because of this, I haven't brought this up on wm-spec-list or the relevant list for xdnd stuff yet. But, I figure my patch can at least serve as a discussion starting point. :) To test, you just need the patch I'll attach in a minute plus the one I attached to bug 112308. Two things I did notice in testing are: (a) XdndEnter events aren't sent to all windows (e.g. emacs -- probably because it doesn't support XDND, so it probably makes sense to not raise such windows anyway), and (b) it'd be nice to restore window stacking to its original state if the user cancels the dnd operation by hitting escape, which would require some new kind of message altogether.
Created attachment 65103 [details] [review] Send XdndEnter and XdndWindow messages with a mask that will allow the WM to receive them
Found a bug with the patch -- if the user moves the mouse out of the window they started in and then moves back into it, they'd expect that initial window to get raised at that point. But, normal dnd doesn't see any point in sending an XdndEnter to itself, so the message isn't sent. So, this problem combined with both bug 81543 comment 6 and the desire to handle dnd-escapes seem to suggest that perhaps sending a different message to the WM than the XdndEnter/XdndLeave messages being sent to the client might be the way to go...
My time seems to have disappeared, so this is probably something more suited to the gtk-2-11 timescale now...
nothing has happened with this in a decade