diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-06-26 13:50:28 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-06-26 13:52:22 +0100 |
commit | aff0d4b29681ee8008ff438885c8cc2b461f4dd5 (patch) | |
tree | ff080d3f97863420ebd0a48860f1dffcd2643b27 /vcl | |
parent | 093d7b8142d0cb224fcf23506f3b36f7a3a10d2c (diff) |
Related: tdf#92293 gtk3 a11y: I suspect that all of this is redundant
in favor of hooking in via get_accessible
Change-Id: I8c265e0d9a5f8bdf02b7ba4be71fc58194cf5aa4
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/unx/gtk/a11y/atkbridge.cxx | 7 | ||||
-rw-r--r-- | vcl/unx/gtk/a11y/atkutil.cxx | 12 | ||||
-rw-r--r-- | vcl/unx/gtk/a11y/atkutil.hxx | 1 |
3 files changed, 17 insertions, 3 deletions
diff --git a/vcl/unx/gtk/a11y/atkbridge.cxx b/vcl/unx/gtk/a11y/atkbridge.cxx index 4bfe5b2f3092..42cd7045e952 100644 --- a/vcl/unx/gtk/a11y/atkbridge.cxx +++ b/vcl/unx/gtk/a11y/atkbridge.cxx @@ -26,6 +26,9 @@ bool InitAtkBridge() { +#if GTK_CHECK_VERSION(3,0,0) + ooo_atk_util_ensure_event_listener(); +#else const char* pVersion = atk_get_toolkit_version(); if( ! pVersion ) return false; @@ -55,13 +58,15 @@ bool InitAtkBridge() AtkRegistry * registry = atk_get_default_registry(); if( registry ) atk_registry_set_factory_type( registry, OOO_TYPE_FIXED, OOO_TYPE_WRAPPER_FACTORY ); - +#endif return true; } void DeInitAtkBridge() { +#if !GTK_CHECK_VERSION(3,0,0) restore_gail_window_vtable(); +#endif } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/unx/gtk/a11y/atkutil.cxx b/vcl/unx/gtk/a11y/atkutil.cxx index cc2fe84c39bd..2ad312436570 100644 --- a/vcl/unx/gtk/a11y/atkutil.cxx +++ b/vcl/unx/gtk/a11y/atkutil.cxx @@ -714,12 +714,20 @@ ooo_atk_util_class_init (AtkUtilClass *) atk_class->get_toolkit_name = ooo_atk_util_get_toolkit_name; atk_class->get_toolkit_version = ooo_atk_util_get_toolkit_version; - Application::AddEventListener( g_aEventListenerLink ); + ooo_atk_util_ensure_event_listener(); } } // extern "C" -/*****************************************************************************/ +void ooo_atk_util_ensure_event_listener() +{ + static bool bInited; + if (!bInited) + { + Application::AddEventListener( g_aEventListenerLink ); + bInited = true; + } +} GType ooo_atk_util_get_type() diff --git a/vcl/unx/gtk/a11y/atkutil.hxx b/vcl/unx/gtk/a11y/atkutil.hxx index 89cb61aeed33..952418869883 100644 --- a/vcl/unx/gtk/a11y/atkutil.hxx +++ b/vcl/unx/gtk/a11y/atkutil.hxx @@ -25,6 +25,7 @@ #define OOO_TYPE_ATK_UTIL ooo_atk_util_get_type() GType ooo_atk_util_get_type(); +void ooo_atk_util_ensure_event_listener(); #endif |