[Libreoffice-commits] core.git: vcl/unx
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Wed May 26 19:50:44 UTC 2021
vcl/unx/gtk3/gtkinst.cxx | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
New commits:
commit 7768abbf86731a1105fcebe7c2557cb9ac5ba86a
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed May 26 17:35:35 2021 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Wed May 26 21:49:56 2021 +0200
gtk4: add parent-less widgets to default container
Change-Id: Ia0c06db5a4f1c4ce453c424835d032ebb021f40a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116217
Tested-by: Caolán McNamara <caolanm at redhat.com>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index 60f7a68de0d1..c03da186f0af 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -19297,12 +19297,14 @@ public:
//gtk impl emulate this by doing this implicitly at weld time
void auto_add_parentless_widgets_to_container(GtkWidget* pWidget)
{
-#if !GTK_CHECK_VERSION(4, 0, 0)
if (widget_get_root(pWidget) == pWidget && !GTK_IS_POPOVER(pWidget) && !GTK_IS_WINDOW(pWidget))
- gtk_container_add(GTK_CONTAINER(m_pParentWidget), pWidget);
+ {
+#if GTK_CHECK_VERSION(4, 0, 0)
+ gtk_widget_set_parent(pWidget, m_pParentWidget);
#else
- (void)pWidget;
+ gtk_container_add(GTK_CONTAINER(m_pParentWidget), pWidget);
#endif
+ }
}
virtual std::unique_ptr<weld::MessageDialog> weld_message_dialog(const OString &id) override
More information about the Libreoffice-commits
mailing list