diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-06-03 16:21:45 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-06-03 21:09:30 +0200 |
commit | 641bfc7a09ea3b11cd9164a597ef52917d11e3a8 (patch) | |
tree | 931533fa740ec033473d5532a5b55fe2e6b68aef | |
parent | 896c2199d9f0a28bd405dd2d1068f5e2973cdf06 (diff) |
gtk4: don't call gtk_widget_destroy on a GtkPopover
Change-Id: Ia65218a231796cb128a95f7bfa1a04dfd769f55a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116675
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | vcl/unx/gtk3/gtkinst.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx index 566e1d0aa53e..22cf2860adc3 100644 --- a/vcl/unx/gtk3/gtkinst.cxx +++ b/vcl/unx/gtk3/gtkinst.cxx @@ -22599,7 +22599,11 @@ public: GtkPopover* pPopover = GTK_POPOVER(gtk_builder_get_object(m_pBuilder, id.getStr())); if (!pPopover) return nullptr; +#if GTK_CHECK_VERSION(4, 0, 0) + return std::make_unique<GtkInstancePopover>(pPopover, this, false); +#else return std::make_unique<GtkInstancePopover>(pPopover, this, true); +#endif } virtual std::unique_ptr<weld::Toolbar> weld_toolbar(const OString &id) override |