gtkwindow: Synthesize pointer crossing events on state changes
authorCarlos Garnacho <carlosg@gnome.org>
Fri, 5 Aug 2022 14:39:56 +0000 (16:39 +0200)
committerCarlos Garnacho <carlosg@gnome.org>
Fri, 5 Aug 2022 17:25:13 +0000 (19:25 +0200)
commitadba0b972e2a86d8f169222d7e64c346dc746325
tree054dcbaad7e3f3061a25f98c6c02c236f81151f5
parentc77b98d71635a4cbec4b089b17659d17af09baf9
gtkwindow: Synthesize pointer crossing events on state changes

When widgets go mapped/unmapped, we repick but don't generate crossing
events. Since there could be stateful controllers that use those in
the previously picked widget (e.g. GtkEventControllerMotion), skipping
those breaks their state.

Ensure to send the relevant crossing events on every situation that
changes the pointer focus, so these controllers get a fair opportunity
to undo their state.

Closes: https://gitlab.gnome.org/GNOME/gtk/-/issues/2877
gtk/gtkwindow.c