popovermenu: Switch back to "main" AFTER unmapping
authorTimm Bäder <mail@baedert.org>
Sun, 6 Oct 2019 10:13:42 +0000 (12:13 +0200)
committerTimm Bäder <mail@baedert.org>
Wed, 9 Oct 2019 14:57:22 +0000 (16:57 +0200)
Otherwise we might set things to child visible etc. while being
unmapped, which is a violation of the widget invariants of these
properties.

gtk/gtkpopovermenu.c

index 02ee7706cbd4db44540d079588cff8f65aedb825..fdc053e6e4f62395585f546e0af21f6020d7881e 100644 (file)
@@ -283,8 +283,8 @@ gtk_popover_menu_map (GtkWidget *widget)
 static void
 gtk_popover_menu_unmap (GtkWidget *widget)
 {
-  gtk_popover_menu_open_submenu (GTK_POPOVER_MENU (widget), "main");
   GTK_WIDGET_CLASS (gtk_popover_menu_parent_class)->unmap (widget);
+  gtk_popover_menu_open_submenu (GTK_POPOVER_MENU (widget), "main");
 }
 
 static void