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 573163 - Sanitize GtkPaned motion event handling
Sanitize GtkPaned motion event handling
Status: RESOLVED OBSOLETE
Product: gtk+
Classification: Platform
Component: Widget: Other
2.15.x
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks: motion-event-tracker
 
 
Reported: 2009-02-25 18:13 UTC by Federico Mena Quintero
Modified: 2014-12-08 04:39 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Untested patch against 2.18.3 (2.68 KB, patch)
2010-03-30 06:22 UTC, Alex Murray
none Details | Review

Description Federico Mena Quintero 2009-02-25 18:13:13 UTC
GtkPaned calls update_drag() in several places, but does not pass it the event's coordinates.  Instead, update_drag() always does gdk_window_get_pointer().  Instead, that function should be passed the event's coordinates from enter/leave and motion events.

Also, although GtkPaned requests GDK_POINTER_MOTION_HINT_MASK, it doesn't call gdk_event_request_motions(); it should do that when it finishes processing a motion event.

Also, gtk_paned_button_release() should update the paned's position with respect to the ButtonRelease event's coordinates; currently it assumes that the last motion event provided the "final" coordinates when dragging.
Comment 1 Alex Murray 2010-03-30 05:26:07 UTC
I am seeing a deadlock in GtkPaned during update_drag() which I wonder if is related to this - essentially when resizing the paned sometimes I get a deadlock where gtkpaned.c is calling gdk_window_get_pointer() and this inturn calls XQueryPointer() and we are stuck on xcb_wait_for_reply() as no reply is received... could this be because gtkpaned is not doing the correct thing with gdk_event_request_motions() ???
Comment 2 Alex Murray 2010-03-30 06:22:07 UTC
Created attachment 157449 [details] [review]
Untested patch against 2.18.3

Untested - posting more for feedback at this stage.
Comment 3 Alex Murray 2010-03-30 06:25:37 UTC
Comment on attachment 157449 [details] [review]
Untested patch against 2.18.3

We remove the grab_time private variable as we no longer need it and should use the final time when doing ungrab instead of the initial time of the grab anyway. Also updated to address original sanitization concerns - use event x,y positions rather than querying for them in update_drag() and call gdk_event_request_motions() after handling motion events, and update paned position on button release too.
Comment 4 Alex Murray 2010-04-16 10:09:47 UTC
Righto after testing the patch I can confirm its crap and bogus. Sorry for the noise, please ignore. May try and get it working properly in the future if I have time.
Comment 5 Matthias Clasen 2014-12-08 04:39:08 UTC
this has all changed; gtkpaned is now using the gesture framework.