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 591034 - Caps_lock does not get re-enabled after orca shutdown and when switching from laptop to desktop layout.
Caps_lock does not get re-enabled after orca shutdown and when switching from...
Status: RESOLVED FIXED
Product: orca
Classification: Applications
Component: general
2.27.x
Other All
: Normal normal
: 2.32.0
Assigned To: Mesar Hameed
Orca Maintainers
Depends on: 618285
Blocks: 373387
 
 
Reported: 2009-08-07 06:30 UTC by Mesar Hameed
Modified: 2010-09-20 10:52 UTC
See Also:
GNOME target: ---
GNOME version: 2.27/2.28


Attachments
rev 1 (1.91 KB, patch)
2009-08-07 06:34 UTC, Mesar Hameed
none Details | Review
rev 2 (1.76 KB, patch)
2009-08-07 13:47 UTC, Mesar Hameed
reviewed Details | Review
Rev 3 (5.15 KB, patch)
2009-08-08 17:48 UTC, Mesar Hameed
none Details | Review
Revised patch (6.38 KB, patch)
2009-08-09 22:31 UTC, Willie Walker
none Details | Review
rev 5 (6.53 KB, patch)
2009-08-13 17:10 UTC, Mesar Hameed
none Details | Review
Patch file to try and trace how Orca quites (1.01 KB, patch)
2010-05-02 16:29 UTC, Thomas REIS
none Details | Review
Rev 6. (6.77 KB, patch)
2010-05-17 12:21 UTC, Mesar Hameed
none Details | Review

Description Mesar Hameed 2009-08-07 06:30:41 UTC
caps lock does not get re-enabled after orca shutdown
also, if user switches back to desktop layout from laptop layout, it should be enabled on the fly.

Patch to be attached.
Comment 1 Mesar Hameed 2009-08-07 06:34:15 UTC
Created attachment 140092 [details] [review]
rev 1

Please test.

Thanks
Comment 2 Mesar Hameed 2009-08-07 13:47:51 UTC
Created attachment 140114 [details] [review]
rev 2

With this into place, I can provide a patch for 
(Bug 373387 - Users should be able to lock/unlock the "Lock" modifier even if Caps Lock is the Orca modifier)  that allow
us to use the pass through to toggle caps lock.
Comment 3 Joanmarie Diggs (IRC: joanie) 2009-08-07 23:05:00 UTC
This looks good to me.
Comment 4 Mesar Hameed 2009-08-08 17:48:33 UTC
Created attachment 140220 [details] [review]
Rev 3

Thanks Joanie!

Attached is a revised version that should be doing exactly the same as the previous, but more generalized.
I wanted it to help us on the fly to determine what modifiers need to be included for (bug 536827 - Provide configuration GUI option to set the Orca key/modifier)

(pylints to 10)

Reasonable to commit?
Comment 5 Mesar Hameed 2009-08-08 18:33:02 UTC
doah, included the configure.in into the patch, didnt mean to do that. Sorry
Comment 6 Joanmarie Diggs (IRC: joanie) 2009-08-09 20:14:14 UTC
I just now am trying this (Sorry! See the atk bug...).

When I launch Orca from the terminal, I see the following lines:

  xmodmap:  unknown command on line stdin:1
  xmodmap:  1 error encountered, aborting.

When I quit I see:

  sh: line 1: add: not found
Comment 7 Joanmarie Diggs (IRC: joanie) 2009-08-09 20:18:44 UTC
Sorry to be spammy. I also see the above error when I change from the Desktop to the Laptop layout. But more importantly, having switched to the Laptop layout and pressed the Apply button, Caps_Lock is functioning as the Orca modifier along with toggling the lock. So I wind up typing in all caps when that's not what I intend to be doing.

I'll leave it to Will to do the official review since this patch has grown more complicate than the last version. From a functional point of view, however, it needs work I'm afraid. I'm really sorry, Jon! And thanks again for all your effort on this bug. Once things are sorted out, this will be great functionality.
Comment 8 Willie Walker 2009-08-09 22:31:04 UTC
Created attachment 140282 [details] [review]
Revised patch

This is a revised patch that isolates things to orca.py and seems to fix the problems Joanie has identified (I hope!).  I think the problem was that the earlier patch tried to do a number of changes with a single xmodmap command, which didn't make some systems happy.

Joanie - can you give this a quick check?
Comment 9 Joanmarie Diggs (IRC: joanie) 2009-08-09 22:58:10 UTC
From the perspective of a "quick check" (OpenSolaris dev build 118), it all seems to work.
Comment 10 Willie Walker 2009-08-10 00:12:08 UTC
I made the executive decision to push this out to at least 2.27.91 since I think it needs more soak time.
Comment 11 Mesar Hameed 2009-08-10 05:27:37 UTC
please see patch.373387-2 which includes patch for this bug.
Comment 12 Mesar Hameed 2009-08-13 17:10:34 UTC
Created attachment 140676 [details] [review]
rev 5

Just discovered git add -p, Very useful indeed.
Patch that solves the issue in question.

Thanks
Comment 13 Willie Walker 2009-08-14 15:35:38 UTC
I wrestled with this one.  The impact of this bug seems to be mostly on public information systems where the system could be left in a state where the CapsLock modifier is left unbound.  In most other cases, it's likely to be a single user machine and the single user would be an Orca user running Orca full time.  So, the bug of not resetting the CapsLock modifier in some cases is indeed a bug, but not one that is huge (which is why this is marked as minor).

The code changes are kind of big for this, so I put this bug in more of the "high risk"/"low impact" category, which is stuff we want to do early in the release cycle versus the end.  I'm going to push this one out for FUTURE and we'll take a poke at it early in the 2.29.x cycle.
Comment 14 Thomas REIS 2010-05-02 16:29:59 UTC
Created attachment 160154 [details] [review]
Patch file to try and trace how Orca quites

Added print statements to try to trace how orca quites.

When we quit Orca from the GUI, we see this:
Orca Shutdown launched from quitOrca()
Orca Shutdown launched from shutdown()

When we quit Orca with 'orca-q' or '--replace', we see this:
Killed

Joanie, does this means that no clean up code is been run?
thank you

Tom and John
Comment 15 Mesar Hameed 2010-05-06 05:28:33 UTC
Hi,

according to:
http://aplawrence.com/SCOFAQ/FAQ_scotec6killminus9.html
and
http://linux.die.net/man/7/signal

we should be trying to handle kill -15 (the standard kill) first, which would run the cleanup code as expected.

Joanie:
in src/orca/orca.in, cleanup(), we use kill -9
If we used kill, our cleanup code in orca.py would be run.
and we could have --force that would do the kill -9 for when orca really has hung.
(separate bug, but it blocks this one)
Sounds reasonable?

Thanks

-Jon
Comment 16 Joanmarie Diggs (IRC: joanie) 2010-05-09 16:17:10 UTC
(In reply to comment #15)
> Hi,
> 
> according to:
> http://aplawrence.com/SCOFAQ/FAQ_scotec6killminus9.html
> and
> http://linux.die.net/man/7/signal
> 
> we should be trying to handle kill -15 (the standard kill) first, which would
> run the cleanup code as expected.
> 
> Joanie:
> in src/orca/orca.in, cleanup(), we use kill -9
> If we used kill, our cleanup code in orca.py would be run.
> and we could have --force that would do the kill -9 for when orca really has
> hung.
> (separate bug, but it blocks this one)
> Sounds reasonable?

I think so. I'd like to try it on my systems before you commit (to get the OpenSolaris coverage), but sure. Go for it.
Comment 17 Mesar Hameed 2010-05-17 12:21:49 UTC
Created attachment 161221 [details] [review]
Rev 6.

Hopefully this is a good one. 
Now that bgo#618285 is closed, this provides all the functionality that i wanted from this fix.

Joanie, does things look ok?

pylinted to 10
Comment 18 Joanmarie Diggs (IRC: joanie) 2010-05-17 13:09:49 UTC
It's working nicely for me in OpenSolaris. If you're comfortable with it, I say go ahead and commit it to master and let the users pound on it.
Comment 19 Mesar Hameed 2010-05-17 17:18:42 UTC
Done.
Thanks