[gtk/wip/corey/nested-popover-menu] modelbutton: Close popover menu submenus consistently
- From: Corey Berla <coreyberla src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/corey/nested-popover-menu] modelbutton: Close popover menu submenus consistently
- Date: Sat, 3 Sep 2022 20:45:01 +0000 (UTC)
commit 99fed1d15cee365139e6a834f24130fbf8412dd2
Author: Corey Berla <corey berla me>
Date: Sat Sep 3 13:40:38 2022 -0700
modelbutton: Close popover menu submenus consistently
In a nested popover menu, the popover submenus are only closed
when pointing to another item that also has a submenu. If the pointer
is hovering over an item without a submenu close any opened
submenus.
gtk/gtkmodelbutton.c | 2 ++
1 file changed, 2 insertions(+)
---
diff --git a/gtk/gtkmodelbutton.c b/gtk/gtkmodelbutton.c
index 624f94a305..a52223752b 100644
--- a/gtk/gtkmodelbutton.c
+++ b/gtk/gtkmodelbutton.c
@@ -1324,6 +1324,8 @@ open_submenu (gpointer data)
gtk_popover_menu_set_open_submenu (GTK_POPOVER_MENU (popover), submenu);
gtk_popover_menu_set_parent_menu (GTK_POPOVER_MENU (submenu), GTK_WIDGET (popover));
}
+ else
+ gtk_popover_menu_close_submenus (GTK_POPOVER_MENU (popover));
}
button->open_timeout = 0;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]