After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 684415 - Fix drag-motion event handling
Fix drag-motion event handling
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkNotebook
unspecified
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks: 635485
 
 
Reported: 2012-09-20 01:24 UTC by Cosimo Cecchi
Modified: 2012-10-22 22:43 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
notebook: consolidate code to remove the switch tab timer (2.08 KB, patch)
2012-09-20 01:24 UTC, Cosimo Cecchi
committed Details | Review
notebook: return TRUE for drag-motion event when over tabs (4.68 KB, patch)
2012-09-20 01:24 UTC, Cosimo Cecchi
committed Details | Review

Description Cosimo Cecchi 2012-09-20 01:24:30 UTC
See attached patches
Comment 1 Cosimo Cecchi 2012-09-20 01:24:32 UTC
Created attachment 224795 [details] [review]
notebook: consolidate code to remove the switch tab timer
Comment 2 Cosimo Cecchi 2012-09-20 01:24:34 UTC
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.
Comment 3 Cosimo Cecchi 2012-10-22 22:43:05 UTC
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