Comment 19 for bug 997630

@chasedouglas & @bregma:

I've looked into this problem some more and the fix should be relatively trivial. I'll attempt to briefly describe the cause of the error, outline a simple solution, and will attach a patch that can be applied to the utouch-geis 2.2.10 source which fixes the problem for me.

The cause of the delay is that `_geis_wait_for_init` attempts to wait a full 5 seconds (GEIS_DEFAULT_INIT_TIMEOUT) or until the Geis backend is initialized. In the event of a failure, i.e., when no backend can be initialized, the 5 second waiting period is still observed. To fix this bug, we need only signal the failure of the initialization process so we can abort from `_geis_wait_for_init` immediately.

To do so, I propose the following changes:
1) Add a new GeisState, GEIS_STATE_ERROR
2) Set geis->state to GEIS_STATE_ERROR whenever no backend can be initialized and we are out of fallbacks.
3) Check for geis->state == GEIS_STATE_ERROR in _geis_wait_for_init and abort.