GNOME Bugzilla – Bug 747406
Fix indicator proximity checks
Last modified: 2015-04-07 10:30:21 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.
Created attachment 301017 [details] [review] Fix indicator proximity checks
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 :)
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.
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.
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.
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 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.
Attachment 301041 [details] pushed as 4c80ac0 - Fix indicator proximity checks