diff options
author | Philipp Lohmann [pl] <Philipp.Lohmann@Sun.COM> | 2010-02-25 12:42:38 +0100 |
---|---|---|
committer | Philipp Lohmann [pl] <Philipp.Lohmann@Sun.COM> | 2010-02-25 12:42:38 +0100 |
commit | d91dbfa6a18a7a0b531be3e9d47177250cc87605 (patch) | |
tree | 01384e1434bcc2f06995095a3b67d6e23a4c3f5d /vcl/unx/gtk/a11y/atkwindow.cxx | |
parent | e9c63b9abda64757d66a0cc6be27bff143cdf029 (diff) |
vcl110: #i103596# add a state change showing for tool tips (workaround)
Diffstat (limited to 'vcl/unx/gtk/a11y/atkwindow.cxx')
-rw-r--r-- | vcl/unx/gtk/a11y/atkwindow.cxx | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/vcl/unx/gtk/a11y/atkwindow.cxx b/vcl/unx/gtk/a11y/atkwindow.cxx index 1bda4eea774e..4327b7a6660a 100644 --- a/vcl/unx/gtk/a11y/atkwindow.cxx +++ b/vcl/unx/gtk/a11y/atkwindow.cxx @@ -146,6 +146,22 @@ ooo_window_wrapper_real_focus_gtk (GtkWidget *, GdkEventFocus *) return FALSE; } +static gboolean ooo_tooltip_map( GtkWidget* pToolTip, gpointer ) +{ + AtkObject* pAccessible = gtk_widget_get_accessible( pToolTip ); + if( pAccessible ) + atk_object_notify_state_change( pAccessible, ATK_STATE_SHOWING, TRUE ); + return FALSE; +} + +static gboolean ooo_tooltip_unmap( GtkWidget* pToolTip, gpointer ) +{ + AtkObject* pAccessible = gtk_widget_get_accessible( pToolTip ); + if( pAccessible ) + atk_object_notify_state_change( pAccessible, ATK_STATE_SHOWING, FALSE ); + return FALSE; +} + /*****************************************************************************/ static bool @@ -211,6 +227,16 @@ ooo_window_wrapper_real_initialize(AtkObject *obj, gpointer data) g_signal_connect_after( GTK_WIDGET( data ), "focus-out-event", G_CALLBACK (ooo_window_wrapper_real_focus_gtk), NULL); + + if( obj->role == ATK_ROLE_TOOL_TIP ) + { + g_signal_connect_after( GTK_WIDGET( data ), "map-event", + G_CALLBACK (ooo_tooltip_map), + NULL); + g_signal_connect_after( GTK_WIDGET( data ), "unmap-event", + G_CALLBACK (ooo_tooltip_unmap), + NULL); + } } /*****************************************************************************/ |