After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 523712 - Orca application specific preferences window doesn't always get focus when user types Insert-Control-Space.
Orca application specific preferences window doesn't always get focus when us...
Status: RESOLVED FIXED
Product: orca
Classification: Applications
Component: general
unspecified
Other Linux
: Normal normal
: 2.22.1
Assigned To: Orca Maintainers
Orca Maintainers
Depends on:
Blocks: 521651
 
 
Reported: 2008-03-21 17:28 UTC by Rich Burridge
Modified: 2008-03-26 22:29 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Revision #1. (1.71 KB, patch)
2008-03-21 20:17 UTC, Rich Burridge
committed Details | Review

Description Rich Burridge 2008-03-21 17:28:57 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. :-(
Comment 1 Joanmarie Diggs (IRC: joanie) 2008-03-21 17:49:28 UTC
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)....
Comment 2 Rich Burridge 2008-03-21 20:17:51 UTC
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.
Comment 3 Mike Pedersen 2008-03-21 21:05:52 UTC
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.
Comment 4 Joanmarie Diggs (IRC: joanie) 2008-03-21 21:08:00 UTC
Mike did you pull the latest from trunk?
Comment 5 Rich Burridge 2008-03-21 22:08:14 UTC
> 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.
Comment 6 Mike Pedersen 2008-03-25 17:51:12 UTC
This seems to work fine. 
Comment 7 Rich Burridge 2008-03-25 18:08:38 UTC
Thanks Mike. Patch applied to SVN trunk and the gnome-2-22 branch.
Moving to "[pending]".