GNOME Bugzilla – Bug 684415
Fix drag-motion event handling
Last modified: 2012-10-22 22:43:11 UTC
See attached patches
Created attachment 224795 [details] [review] notebook: consolidate code to remove the switch tab timer
Created attachment 224796 [details] [review] notebook: return TRUE for drag-motion event when over tabs The GtkNotebook drag-motion event handler may install a timeout when hovering over a tab, in order to switch to it. On the other hand it's desirable for applications to use the empty tab area as a drop target, so the drag-motion handler returns FALSE (also in case it installs the switch tab timeout), as explained in https://bugzilla.gnome.org/show_bug.cgi?id=350665. Unfortunately, applications can use the tab label widget (or a child of it) as a different drop target area, and install their own drag-motion handler there. In this scenario, the timeout will still be installed by GtkNotebook's handler, but since it returns FALSE, it will never get the matching drag-leave event, causing it to trigger also when the mouse pointer moved elsewhere before it expired. Fix this by returning TRUE from drag-motion when the event is over a tab. Note that this makes automatic tab switching not work anymore when drag and drop is handled in the tab label widget; applications are expected to also handle tab switching if desired in such a case.
Attachment 224795 [details] pushed as 42da600 - notebook: consolidate code to remove the switch tab timer Attachment 224796 [details] pushed as 852d4d6 - notebook: return TRUE for drag-motion event when over tabs