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 747406 - Fix indicator proximity checks
Fix indicator proximity checks
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkScrolledWindow
unspecified
Other All
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2015-04-06 13:10 UTC by Matthias Clasen
Modified: 2015-04-07 10:30 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix indicator proximity checks (2.04 KB, patch)
2015-04-06 13:10 UTC, Matthias Clasen
none Details | Review
Fix indicator proximity checks (3.85 KB, patch)
2015-04-07 01:28 UTC, Matthias Clasen
committed Details | Review

Description Matthias Clasen 2015-04-06 13:10:29 UTC
The coordinate translations here were not working properly
for window widgets inside the scrolled window, as can be
seen e.g. for the horizontal scrollbar of the 'Tree View'
example in gtk3-demo.
The easy fix is to use global coordinates.
Comment 1 Matthias Clasen 2015-04-06 13:10:38 UTC
Created attachment 301017 [details] [review]
Fix indicator proximity checks
Comment 2 Carlos Garnacho 2015-04-06 14:37:17 UTC
Comment on attachment 301017 [details] [review]
Fix indicator proximity checks

Might be the most practical approach, I'm slightly uneasy though with making sync calls on the X backend on such frequent paths (IIRC gdk_window_get_origin falls into one), let's call it remainings from past mobile experience :)
Comment 3 Matthias Clasen 2015-04-06 15:14:06 UTC
yeah, I'd prefer to not use global coordinates here, but I shied away from figuring out the correct magic to translate from event coordinates in widget a to widget coordinates in widget b.
Comment 4 Carlos Garnacho 2015-04-06 16:39:07 UTC
That's around in a few places indeed :(, GtkGesture does the right thing and passes always widget coordinates, but implementations usually rely on press..motion..release sequences, I'm pondering about having an internal one to track motions, that sounds useful for at least this case and tooltips.
Comment 5 Matthias Clasen 2015-04-07 01:28:31 UTC
Created attachment 301041 [details] [review]
Fix indicator proximity checks

The coordinate translations here were not working properly
for window widgets inside the scrolled window, as can be
seen e.g. for the horizontal scrollbar of the 'Tree View'
example in gtk3-demo.
Comment 6 Matthias Clasen 2015-04-07 01:31:00 UTC
Here's another patch that seems to work just as well, and avoids global coordinates. The coordinate translation code is copied from gtkgesture.c
Comment 7 Carlos Garnacho 2015-04-07 10:27:35 UTC
Comment on attachment 301041 [details] [review]
Fix indicator proximity checks

Looks good to me :). I'll look into getting rid of the duplication anyway, but might not be as easy as I first thought, the expectations on the events received is bolted into gtkgesture.c itself, so this would be a new/different mode of operation.
Comment 8 Matthias Clasen 2015-04-07 10:30:18 UTC
Attachment 301041 [details] pushed as 4c80ac0 - Fix indicator proximity checks