[Libreoffice-commits] core.git: vcl/unx

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Mon May 10 18:59:49 UTC 2021


 vcl/unx/gtk3/gtksalmenu.cxx |    5 +++++
 1 file changed, 5 insertions(+)

New commits:
commit d9a6e0c8b74522fca7ff008a13184e479efd1ba0
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon May 10 17:30:56 2021 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Mon May 10 20:58:59 2021 +0200

    gtk4: GtkPopoverMenu doesn't have "deactivate", try "closed"
    
    Change-Id: Ia14944468ebe743999d8c283b96f60352589f82e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115351
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/vcl/unx/gtk3/gtksalmenu.cxx b/vcl/unx/gtk3/gtksalmenu.cxx
index 24e173711687..b965880cfbcb 100644
--- a/vcl/unx/gtk3/gtksalmenu.cxx
+++ b/vcl/unx/gtk3/gtksalmenu.cxx
@@ -440,7 +440,11 @@ bool GtkSalMenu::ShowNativePopupMenu(FloatingWindow* pWin, const tools::Rectangl
     //launching PopupMenu to be destroyed, instead run the subloop here
     //until the gtk menu is destroyed
     GMainLoop* pLoop = g_main_loop_new(nullptr, true);
+#if GTK_CHECK_VERSION(4, 0, 0)
+    g_signal_connect_swapped(G_OBJECT(pWidget), "closed", G_CALLBACK(g_main_loop_quit), pLoop);
+#else
     g_signal_connect_swapped(G_OBJECT(pWidget), "deactivate", G_CALLBACK(g_main_loop_quit), pLoop);
+#endif
 
 
     // tdf#120764 It isn't allowed under wayland to have two visible popups that share
@@ -484,6 +488,7 @@ bool GtkSalMenu::ShowNativePopupMenu(FloatingWindow* pWin, const tools::Rectangl
         gtk_popover_set_pointing_to(GTK_POPOVER(pWidget), &rect);
         (void)nFlags;
         //TODO use gtk_popover_set_position
+        gtk_popover_popup(GTK_POPOVER(pWidget));
 #endif
     }
     else


More information about the Libreoffice-commits mailing list