GNOME Bugzilla – Bug 655047
"non-at-spi mode"
Last modified: 2011-08-12 13:32:48 UTC
The input-method-based support is cool, except that it only works for people who don't already need to use some other IM. It looks like in master you've started making the IM module use Atk interfaces, which (as I understand it) are now available in-process whether or not at-spi is running. So given that, and the fact there is also a gsetting key for specifying arbitrary gtk modules to load (org.gnome.settings-daemon.plugins.xsettings.enabled-gtk-modules, which gets synced to the Gtk/Modules XSETTINGS key), it seems like we could make the "input method" not actually be an input method, but rather just be a module that snoops on the app via atk, and then we can make gnome-settings-daemon add that module to enabled-gtk-modules when the keyboard is enabled, thereby getting the same effect as the current IM module, without interfering with the user's existing IM. (This only works for gtk3. Gtk2 would still need an IM, and then there's the whole non-gtk problem. It seems like maybe we could implement a X Input Method, which could get used by gtk2, qt, and plain X apps, but I can't figure out exactly how one goes about implementing one of those...)
I arrived at a similar place, with some issues. Why can't we do the same in gtk2? The neatness of the IM now is the the gtk2 one is just a sym link to the gtk3 one. AFAICT, xim does not give information about the input area relative to the screen. So if we would want to properly support other toolkits we would need to do the same in all of them. I looked into making a QT4 IM, didn't look hard. Of course then we are duplicating the whole point of AT-SPI, which is to give a uniform interface to all toolkits.
> Why can't we do the same in gtk2? The neatness of the IM now is the the gtk2 > one is just a sym link to the gtk3 one. Hm... I was thinking "in gtk2 you can't do this because gail won't have been loaded and so you won't have atk objects", but I guess if we're telling it to load the caribou gtkmodule, we can just tell it to load gail too... Does gail work correctly without at-spi-bridge? (Also, I'm not sure how the modules xsetting works with respect to gtk2 vs gtk3...) > AFAICT, xim does not give information about the input area relative to the > screen. I have not been able to find much documentation on XIM, but http://www-archive.mozilla.org/projects/intl/input-method-spec.html says, eg, "Over-the-Spot style requires the application to provide the input method with information about about the current font and the location (coordinates) of the spot. The application must change the font and spot location information (through XSetICValue) as the document editing progresses." > Of course then we are duplicating the whole point of AT-SPI, which is to give a > uniform interface to all toolkits. If we can use at-spi, then great, but last time I tried it made the desktop completely unusable. (Like, had to kill gnome-session from a vt.)
Created attachment 193661 [details] [review] Current solution for GTK_MODULES bug The following patch is the compilation of all patches that comprise my current solution for the GTK_MODULES bug. For more information about individual patches look at the gtk-module branch at https://github.com/danwinship/caribou/.
Thanks! I merged this, should be in 0.3.5.
Created attachment 193691 [details] [review] Bump required vala version to 0.13 Needed to get the fix for bug 644275 so that the call to Bus.get_proxy_async() will compile correctly.