After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 564751 - [Accessibility] No way to override gtk-modules setting
[Accessibility] No way to override gtk-modules setting
Status: RESOLVED OBSOLETE
Product: gtk+
Classification: Platform
Component: Accessibility
2.14.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks: 563876
 
 
Reported: 2008-12-16 16:28 UTC by Brad Taylor
Modified: 2012-08-07 04:43 UTC
See Also:
GNOME target: ---
GNOME version: 2.23/2.24


Attachments
proposed patch (beware: not tested yet, just posting for early review) (872 bytes, patch)
2008-12-16 17:07 UTC, Andrés G. Aragoneses (IRC: knocte)
none Details | Review

Description Brad Taylor 2008-12-16 16:28:20 UTC
Because of #539840 and #117236, if you have accessibility enabled, atk-bridge and gail are now loaded automatically for any application that calls gtk_init ().

This is clearly not a problem for strictly Gtk+ applications, but both Firefox and OpenOffice use Gtk+ for toolkit theming and integration, but at the same time need to provide their own accessibility implementation.  Sadly, the same is true of the Mono Accessibility project (http://mono-project.com/Accessibility) that I hack on. 

The previous hack used by folks was to blank out the GTK_MODULES environment variable before gtk_init () was called.  This conveniently only applied for the current application, and worked mostly well until the patch in #539840 was committed.

Now, Gtk/Modules is correctly set (good), but since Gtk/Modules is now queried inside of gtk_init () (by a callback set up by _gtk_modules_init), the only way it can be overridden is to set the XSetting for the screen.  And while that can be done before gtk_init () and then restored after, it's chock full of race conditions.

What I'm hoping for is some way to stop the gail and atk-bridge modules from being started, either by blacklist or other means.
Comment 1 Andrés G. Aragoneses (IRC: knocte) 2008-12-16 17:07:09 UTC
Created attachment 124813 [details] [review]
proposed patch (beware: not tested yet, just posting for early review)

Reasoning of this patch:
g_object_get already calls gdk_screen_get_setting through gtk_settings_get_property.

Using it instead of gdk_screen_get_setting in gtkmodules.c, we allow pre-setting the property before gtk_init, for custom purposes in the loading process of gtk-modules.

I'll deal now with the dependencies of gtk+ to try to build it and hopefully test it.
Comment 2 Owen Taylor 2008-12-16 18:18:05 UTC
If you modify the gtk-modules setting then the app won't see any more
changes to the gtk-modules settings.

That's not really acceptable, since accessibility modules are only
one type of modules. Modules are also used for example, for event
sound handling.

===

In terms of the patch, clearly the existing code where it calls
gdk_screen_get_setting() rather than going through
g_object_get_property() is odd and strange. But because it's odd
and strange, I suspect that there's some reason for doing it that
way. That may be discoverable from subversion history and/or past
bugzilla comments.
Comment 3 Ray Wang 2009-01-19 02:28:56 UTC
I'd like to keep track on this bug
Comment 4 Matthias Clasen 2012-08-07 04:43:44 UTC
gtk modules are no longer relevant for a11y, since we've included gail into gtk and link against atk-bridge