diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-09-27 15:05:59 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-09-27 18:04:10 +0200 |
commit | dda21ca52433e3899e0990d852e20af6d8a2e72f (patch) | |
tree | 0d27c3c9e82403485a713dc084f4bb5a25e3f215 | |
parent | c918afc1555149ee2e1f8e1f560f1eac3fabaa04 (diff) |
gtk4: use gtk_widget_unparent to drop ref count to 0 and destroy
so now gtk4 slideshow mouse input works after an opengl slide has finished
Change-Id: I156d584417d12ab30551445f93e876cca8453e70
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122715
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | vcl/unx/gtk3/gtkobject.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/vcl/unx/gtk3/gtkobject.cxx b/vcl/unx/gtk3/gtkobject.cxx index 3b9757650e53..d5fb4119a98b 100644 --- a/vcl/unx/gtk3/gtkobject.cxx +++ b/vcl/unx/gtk3/gtkobject.cxx @@ -110,9 +110,11 @@ GtkSalObjectBase::~GtkSalObjectBase() GtkSalObject::~GtkSalObject() { -#if !GTK_CHECK_VERSION(4, 0, 0) if( m_pSocket ) { +#if GTK_CHECK_VERSION(4, 0, 0) + gtk_widget_unparent(m_pSocket); +#else // remove socket from parent frame's fixed container gtk_container_remove( GTK_CONTAINER(gtk_widget_get_parent(m_pSocket)), m_pSocket ); @@ -122,8 +124,8 @@ GtkSalObject::~GtkSalObject() // this is just a sanity check if( m_pSocket ) gtk_widget_destroy( m_pSocket ); - } #endif + } } void GtkSalObject::ResetClipRegion() |