GNOME Bugzilla – Bug 756147
Calling gtk_init() with an open display doesn't initialize a11y
Last modified: 2015-10-06 22:26:45 UTC
While looking at bug 656314 I noticed that calling gdk_init() before gtk_init() makes everything 40ms faster. This is due to gtk_init() not calling _gtk_accessibility_init() if a display is already open.
Created attachment 312771 [details] [review] Fix accessibility not getting initialized in gtk_init() if a default display is already set _gtk_accessibility_init() only gets called if the default display changes, but in case gdk_init() is called before gtk_init() the default display is already set and no property notification occurs. This can happen quite easily in pygobject where "from gi.repository import Gdk, Gtk" will call gdk_init() followed by gtk_init() in the Python overrides. This fixes it by checking for a default display in all cases.
Review of attachment 312771 [details] [review]: Looks good.
Also, while we're at it: can we please, for the love of all that's good and pure in the Universe, make PyGObject stop calling the initializing functions when importing the modules? It's broken on many, many levels.
Thanks https://git.gnome.org/browse/gtk+/commit/?id=263cbd90a063afa214855e52e88908853d7a2b8d (In reply to Emmanuele Bassi (:ebassi) from comment #3) > Also, while we're at it: can we please, for the love of all that's good and > pure in the Universe, make PyGObject stop calling the initializing functions > when importing the modules? It's broken on many, many levels. bug 731091