diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-05-10 20:29:38 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-05-11 09:45:01 +0200 |
commit | 3478c3ca5c2383c5340d1deaa22099d93bb2972f (patch) | |
tree | 4e6213e670793e8ea1b140f86b5c2e6e3fbe5676 /vcl | |
parent | 65543a53c4058a6e491bc3ef8ca71970a1bc50b7 (diff) |
gtk4: use GTK_POPOVER_MENU_NESTED to avoid crash on submenus
gtk_popover_menu_new crashes on submenus with:
"signal 'action-added' is invalid for instance of type 'GtkActionMuxer'"
Change-Id: I5d66b727dc45ac539b11e08665d69e019f5dded6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115362
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/unx/gtk3/gtksalmenu.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/vcl/unx/gtk3/gtksalmenu.cxx b/vcl/unx/gtk3/gtksalmenu.cxx index ac28c3ca5961..a5e7376a79c0 100644 --- a/vcl/unx/gtk3/gtksalmenu.cxx +++ b/vcl/unx/gtk3/gtksalmenu.cxx @@ -430,7 +430,8 @@ bool GtkSalMenu::ShowNativePopupMenu(FloatingWindow* pWin, const tools::Rectangl GtkWidget *pWidget = gtk_menu_new_from_model(mpMenuModel); gtk_menu_attach_to_widget(GTK_MENU(pWidget), mpFrame->getMouseEventWidget(), nullptr); #else - GtkWidget *pWidget = gtk_popover_menu_new_from_model(mpMenuModel); + // TODO: gtk_popover_menu_new crashes on submenus with: "signal 'action-added' is invalid for instance of type 'GtkActionMuxer'" + GtkWidget *pWidget = gtk_popover_menu_new_from_model_full(mpMenuModel, GTK_POPOVER_MENU_NESTED); gtk_widget_set_parent(pWidget, mpFrame->getMouseEventWidget()); #endif gtk_widget_insert_action_group(mpFrame->getMouseEventWidget(), "win", mpActionGroup); |