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

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Sun Jun 27 20:11:12 UTC 2021


 vcl/unx/gtk3/gtkinst.cxx |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 3618d847a44bb485a3564c600d5005797934b9bb
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sun Jun 27 19:23:23 2021 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Sun Jun 27 22:10:41 2021 +0200

    gtk4: restore original parent if there was one
    
    Change-Id: Ia3d8da14f545deace3024823b4cf8453937e3f82
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117957
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index d7908bc59493..9d82df343911 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -10468,7 +10468,10 @@ public:
         g_signal_handler_disconnect(m_pMenu, nSignalId);
 
 #if GTK_CHECK_VERSION(4, 0, 0)
-        gtk_widget_unparent(GTK_WIDGET(m_pMenu));
+        if (!pOrigParent)
+            gtk_widget_unparent(GTK_WIDGET(m_pMenu));
+        else
+            gtk_widget_set_parent(GTK_WIDGET(m_pMenu), pOrigParent);
 #else
         gtk_menu_detach(m_pMenu);
 #endif


More information about the Libreoffice-commits mailing list