Greetings,
 
To date, our at-spi applications do not have GUI interfaces, but we are
now trying to add one.  I seem to be experiencing some restrictions and
am wondering if there are certain rules that need to be followed?
 
Our app runs the SPI event loop in the main thread, so during startup
the Gtk+ GUI and its event loop are started in a new thread.  The
effective end of the main thread looks like this:
 
createListeners();
registerListeners();
SPI_event_main();
SPI_deregisterAll(genericListener);
 
If execution of the main thread makes it past registerListeners() before
the GUI is initialized, then the GUI never comes up, it hangs in the
call to show the app's main window: gtk_widget_show(window).  If I stop
the main thread before registerListeners() and wait until
gtk_widget_show(window) returns, then the GUI comes up and mostly works.
registerListeners just consists of a series of calls on
SPI_registerGlobalEventListener, SPI_registerDeviceEventListener, and
SPI_registerAccessibleKeystrokeListener.
 
Does anyone have an explanation for this behavior?  What is it in the
SPI_register* routines that would cause gtk_widget_show(window) to hang?
 
Sometimes, when the GUI fails to initialize and the app tries an orderly
shutdown, I get this error:

(<unknown>:10225): Bonobo-CRITICAL **: bonobo_main_quit: assertion
`bonobo_main_loops != NULL' failed

-Sam
 
PS: Here's a possibly related fact.   Right now the GUI has three
buttons.  Two just print a message. If I click these two over and over I
see their messages.  After 8 seconds a timer kills the entire process by
calling SPI_event_quit and the process exits normally: SPI_event_main
returns and the listeners are all deregistered.
 
The third button, "exit", exits the GUI by calling
gtk_widget_destroy(window) and gtk_main_quit.  The GUI goes away.
However when the timer tries to kill the process something goes wrong.
A message that is supposed to be displayed in the terminal with a printf
is not displayed, even though logging events that happen before and
after the printf are logged.  SPI_event_main() (shown above) returns,
but the call on SPI_deregisterAll hangs.
_______________________________________________
Gnome-accessibility-devel mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/gnome-accessibility-devel

Reply via email to