diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-09-25 23:05:18 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-09-27 11:34:56 +0200 |
commit | 0f2e01677cd0e8857faec99c61d71e88eee78b27 (patch) | |
tree | 555e7ad3b6aacaf18caf52ad3e46c12c95620986 /vcl/unx | |
parent | 753dd7c178100ade0f14b2f127691b756d03572c (diff) |
dispose custom widget a11y on teardown
Change-Id: Iea80ffff0b36e093e4b8e513e924a21da67cb2ce
Reviewed-on: https://gerrit.libreoffice.org/61009
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/unx')
-rw-r--r-- | vcl/unx/gtk3/gtk3gtkinst.cxx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx index 0f64c2edad45..2ada31149d6f 100644 --- a/vcl/unx/gtk3/gtk3gtkinst.cxx +++ b/vcl/unx/gtk3/gtk3gtkinst.cxx @@ -1911,7 +1911,8 @@ public: virtual void set_busy_cursor(bool bBusy) override { - gtk_widget_realize(m_pWidget); + if (!gtk_widget_get_realized(m_pWidget)) + gtk_widget_realize(m_pWidget); GdkDisplay *pDisplay = gtk_widget_get_display(m_pWidget); GdkCursor *pCursor = bBusy ? gdk_cursor_new_from_name(pDisplay, "progress") : nullptr; gdk_window_set_cursor(gtk_widget_get_window(m_pWidget), pCursor); @@ -4582,6 +4583,9 @@ public: g_object_steal_data(G_OBJECT(m_pDrawingArea), "g-lo-GtkInstanceDrawingArea"); if (m_pAccessible) g_object_unref(m_pAccessible); + css::uno::Reference<css::lang::XComponent> xComp(m_xAccessible, css::uno::UNO_QUERY); + if (xComp.is()) + xComp->dispose(); g_signal_handler_disconnect(m_pDrawingArea, m_nPopupMenu); g_signal_handler_disconnect(m_pDrawingArea, m_nQueryTooltip); g_signal_handler_disconnect(m_pDrawingArea, m_nStyleUpdatedSignalId); |