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>
This commit is contained in:
Caolán McNamara 2018-09-25 23:05:18 +01:00
parent 753dd7c178
commit 0f2e01677c

View File

@ -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);