vcl/unx/gtk3/gtkinst.cxx | 6 ++++++ 1 file changed, 6 insertions(+) New commits: commit ac3bc06fc2da5d5ca0d5b2c64440480c7e870494 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Fri Sep 17 10:24:50 2021 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Fri Sep 17 15:05:16 2021 +0200
gtk4: fill context menus Change-Id: Ie59f569f8917dee730e79a3bea6c3e6161ae9fea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122241 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx index b09e7f56d503..2131dbabb24a 100644 --- a/vcl/unx/gtk3/gtkinst.cxx +++ b/vcl/unx/gtk3/gtkinst.cxx @@ -10431,6 +10431,8 @@ public: void* pData = g_object_get_data(G_OBJECT(pTopLevelMenu), "g-lo-GtkInstanceMenu"); m_pTopLevelMenuHelper = static_cast<GtkInstanceMenu*>(pData); } +#else + update_action_group_from_popover_model(); #endif } @@ -10449,6 +10451,8 @@ public: GMainLoop* pLoop = g_main_loop_new(nullptr, true); #if GTK_CHECK_VERSION(4, 0, 0) + gtk_widget_insert_action_group(pWidget, "menu", m_pActionGroup); + gulong nSignalId = g_signal_connect_swapped(G_OBJECT(m_pMenu), "closed", G_CALLBACK(g_main_loop_quit), pLoop); GdkRectangle aRect; @@ -10524,6 +10528,8 @@ public: gtk_widget_unparent(GTK_WIDGET(m_pMenu)); else gtk_widget_set_parent(GTK_WIDGET(m_pMenu), pOrigParent); + + gtk_widget_insert_action_group(pWidget, "menu", nullptr); #else gtk_menu_detach(m_pMenu); #endif