If the previous focus widget is unmapped (eg. hidden, scheduled for destruction, etc), make the popover forget about it and grant focus back to the window itself.
ccdcff9 popover: make smarter wrt previous focus widget lifetime
gtk/gtkpopover.c | 57 ++++++++++++++++++++++++++++++++++++++++--------------
1 file changed, 42 insertions(+), 15 deletions(-)
Upstream: git.gnome.org