widget: Make gtk_widget_pick() really slow
authorBenjamin Otte <otte@redhat.com>
Sun, 5 Nov 2017 03:05:55 +0000 (04:05 +0100)
committerBenjamin Otte <otte@redhat.com>
Sun, 5 Nov 2017 04:13:17 +0000 (05:13 +0100)
commit994287b71fc208d9b810f15ef7fd6dfa6364737a
treef205a19f3e587576d595d003b066c672c02f91ed
parentcf1cd19b6184113068bf94feef7e6e42c53b4883
widget: Make gtk_widget_pick() really slow

We cannot fast-track picking by using gtk_widget_contains(). Child
widgets may extend their parent using ie negative margins.

This is not just a theoretical concern, this is what's happening right
now with GtkScale's sliders relative to the trough.

The problem is that we now iterate through all widgets, even when they
aren't anywhere near the mouse pointer. So essentially every pick
operation is now guaranteed O(N_WIDGETS) which used to be the worst case
that pretty much never happened.
gtk/gtkwidget.c