[Libreoffice-commits] core.git: vcl/unx
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Wed Jun 2 15:13:04 UTC 2021
vcl/unx/gtk3/gtkinst.cxx | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
New commits:
commit 3f01481e1fb79a1148e375bd19db7ab0b6d484c0
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed Jun 2 14:34:20 2021 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Wed Jun 2 17:12:21 2021 +0200
gtk4: we want to give parentless widgets a parent
Its unknown why I didn't use gtk_widget_get_parent in the first place
but lets leave it alone for the gtk3 case
Change-Id: I71f933753983ecb0d702975d6822f0ba265d4622
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116599
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 69596ed31b24..def1fa5b1b67 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -21899,14 +21899,17 @@ public:
//gtk impl emulate this by doing this implicitly at weld time
void auto_add_parentless_widgets_to_container(GtkWidget* pWidget)
{
- if (widget_get_toplevel(pWidget) == pWidget && !GTK_IS_POPOVER(pWidget) && !GTK_IS_WINDOW(pWidget))
- {
+ if (GTK_IS_POPOVER(pWidget))
+ return;
+ if (GTK_IS_WINDOW(pWidget))
+ return;
#if GTK_CHECK_VERSION(4, 0, 0)
+ if (!gtk_widget_get_parent(pWidget))
gtk_widget_set_parent(pWidget, m_pParentWidget);
#else
+ if (widget_get_toplevel(pWidget) == 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