Fix unsetting focus
authorMatthias Clasen <mclasen@redhat.com>
Sat, 30 Jan 2021 02:41:16 +0000 (21:41 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Sat, 30 Jan 2021 02:41:16 +0000 (21:41 -0500)
commit3dbf5038fab8eb0d8c112ad179c5647e0306656e
tree02dbb1db3a9ff14bb7bdc6d73946e3a026f5f197
parent456a2f3bcfe23c5a964d8f1e00b65d7e5445296e
Fix unsetting focus

Make _gtk_window_unset_focus_and_default queue the changes
for after the next draw. This achieves two things: first,
it avoids invalidating css at the wrong time (e.g. when
setting child-visible during size-allocation), and second,
it defers the focus change until after the widget is
hidden, so that moving the focus has the desired effect
of picking a different, visible widget.

Fixes: #3623
gtk/gtkwindow.c