diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-11-19 09:56:01 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-11-19 14:58:40 +0100 |
commit | 52d199b364bf65168e5e43b039e6036b87d37403 (patch) | |
tree | 249bbe522ae539c78eea1a2f622d8dab93ab2ee9 /vcl/unx | |
parent | a59b5f9e80c382a74085f93601de3cb0a6b9e174 (diff) |
gtk4: GtkPopover parent must be set before its shown
Change-Id: I6184422b92d3629f31141215bed588400b30289c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125542
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/unx')
-rw-r--r-- | vcl/unx/gtk3/gtkinst.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx index 3791ef5709a7..fbf98d830c11 100644 --- a/vcl/unx/gtk3/gtkinst.cxx +++ b/vcl/unx/gtk3/gtkinst.cxx @@ -21898,7 +21898,9 @@ public: GdkRectangle aRect; pWidget = getPopupRect(pWidget, rRect, aRect); -#if !GTK_CHECK_VERSION(4, 0, 0) +#if GTK_CHECK_VERSION(4, 0, 0) + gtk_widget_set_parent(GTK_WIDGET(m_pPopover), pWidget); +#else gtk_popover_set_relative_to(m_pPopover, pWidget); #endif gtk_popover_set_pointing_to(m_pPopover, &aRect); |