GNOME Bugzilla – Bug 523712
Orca application specific preferences window doesn't always get focus when user types Insert-Control-Space.
Last modified: 2008-03-26 22:29:15 UTC
This is with latest Orca from SVN trunk on latest Ubuntu Hardy with the metacity window manager and with click to focus Window behavior. Steps to reproduce: 1/ Start Orca 2/ Start oocalc. 3/ Press Insert-Control-Space to bring up the Orca application specific preferences dialog window for oocalc. 4/ Press End to get to the soffice page tab. 5/ Press Tab to give focus to the checkbox option. 6/ Press Space to toggle the current selection. 7/ Press Alt-o to activate the OK button and dismiss the dialog. 8/ Press Insert-Control-Space to bring up the Orca application specific preferences dialog window for oocalc again. Expected results: The Orca application specific preferences dialog window for oocalc would have focus. Actual results: It doesn't. Focus is still with the oocalc window. This is causing Orca oorca regression test .../test/keystrokes/oocalc/bug_363804.py to fail to reset the oocalc cell checkbox state to its original value therefore rendering incorrect results for the remainders of the tests in the .../test/keystrokes/oocalc directory when doing a runall.sh (see bug #521651). Note that it doesn't have to be the application specific preferences dialog. It looks like we get the same problem when the user does an Insert-Space to bring up the Orca Preferences dialog a second time, when focus was previously on another application than Orca. ---- While I've been waiting for GNOME Bugzilla to come back, I've been trying out various alternatives. The Preferences dialog is a "Normal" type window. I tried making it a Dialog but that didn't make a difference. I also tried making it modal, but that didn't fix it either. If I make it both a Dialog and modal (like for example the Orca Quit dialog), that didn't fix it either. I'm wondering whether it's something to do with us destroying the window after the user presses the OK button. As it currently stands, with the Quit dialog, if the user presses the Cancel button, then we just hide it. I changed this code to destroy() the dialog instead of hide() it, and now when I run Orca, and press Insert-q to bring up the Quit dialog and then press Cancel and then press Insert-q to bring it up again, the second time it still has focus. So that isn't the problem. So at this point, I'm not quite sure how to fix this. :-(
Seems to only happen if the Orca main window is visible. I wonder if some property of it is to blame (i.e. as opposed to some property of the Preferences window)....
Created attachment 107752 [details] [review] Revision #1. Joanie and I nutted this out. This seems to fix the problem. Patch not committed yet. Others please test.
I've been pounding on this one for a half hour or so and am always getting the dialog though. The only thing I am noticing is that we are still getting the "please wait" message when starting the app specific settings.
Mike did you pull the latest from trunk?
> The only thing I am noticing is that we are still getting the > "please wait" message when starting the app specific settings. I snuck a fix in for that into SVN trunk about 1:30pm PST. Hopefully if you pull the latest this minor annoyance should be gone.
This seems to work fine.
Thanks Mike. Patch applied to SVN trunk and the gnome-2-22 branch. Moving to "[pending]".