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 682542 - Hide the a11y menu in the lock screen, but show it in the login screen
Hide the a11y menu in the lock screen, but show it in the login screen
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: lock-screen
3.5.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
: 682543 (view as bug list)
Depends on:
Blocks: 682546
 
 
Reported: 2012-08-23 13:27 UTC by Allan Day
Modified: 2012-09-10 19:26 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
ScreenShield: move lock status handling to a three state enumeration (21.45 KB, patch)
2012-08-26 15:16 UTC, Giovanni Campagna
none Details | Review
ScreenShield: move lock status handling to a three state enumeration (21.94 KB, patch)
2012-08-26 16:16 UTC, Giovanni Campagna
none Details | Review
ScreenShield: move lock status handling to use session mode (11.36 KB, patch)
2012-09-04 19:02 UTC, Giovanni Campagna
none Details | Review
ScreenShield: move lock status handling to use session mode (9.79 KB, patch)
2012-09-06 14:48 UTC, Giovanni Campagna
needs-work Details | Review
ScreenShield: move lock status handling to use session mode (14.56 KB, patch)
2012-09-10 09:39 UTC, Giovanni Campagna
committed Details | Review

Description Allan Day 2012-08-23 13:27:28 UTC
During user testing for the lock screen, the a11y menu caused problems. People were drawn to it, but couldn't work out what it was for. It would therefore be better to hide it.

The a11y menu is needed in the login screen though - people need to be able to use the on-screen keyboard or screen reader to log in.
Comment 1 Giovanni Campagna 2012-08-26 15:15:30 UTC
*** Bug 682543 has been marked as a duplicate of this bug. ***
Comment 2 Giovanni Campagna 2012-08-26 15:16:14 UTC
Created attachment 222475 [details] [review]
ScreenShield: move lock status handling to a three state enumeration

Have distinct states for the lock screen and the unlock dialog, and rework
the logic in ScreenShield for state changes, to minimize unnecessary
signal emissions.
Adapt the various components to the new API, and in particular show a11y
and keyboard in the unlock dialog but not in the lock screen.
Comment 3 Jasper St. Pierre (not reading bugmail) 2012-08-26 15:17:53 UTC
Review of attachment 222475 [details] [review]:

We're getting into session mode territory, here. Can we do something with that?
Comment 4 Giovanni Campagna 2012-08-26 15:20:54 UTC
(In reply to comment #3)
> Review of attachment 222475 [details] [review]:
> 
> We're getting into session mode territory, here. Can we do something with that?

I think ScreenShield state is somehow orthogonal to session mode: State.FULL_SESSION is defined to be "whatever the session mode says", and all mode need some way to go to State.LOCK_SCREEN, although only normal mode ever goes to State.UNLOCK_DIALOG.
Comment 5 Giovanni Campagna 2012-08-26 16:16:20 UTC
Created attachment 222479 [details] [review]
ScreenShield: move lock status handling to a three state enumeration

Have distinct states for the lock screen and the unlock dialog, and rework
the logic in ScreenShield for state changes, to minimize unnecessary
signal emissions.
Adapt the various components to the new API, and in particular show a11y
and keyboard in the unlock dialog but not in the lock screen.

Rebased on top of bug 682540.
Comment 6 Giovanni Campagna 2012-09-04 19:02:25 UTC
Created attachment 223459 [details] [review]
ScreenShield: move lock status handling to use session mode

Have distinct session modes for the lock screen and the unlock dialog,
and rework the logic in ScreenShield for mode changes, to ensure we can
compute the current mode and the new mode at each transition.

Rebased on top of bug 683156. It's a much smaller patch now.
Comment 7 Giovanni Campagna 2012-09-05 11:07:28 UTC
Note this is needed to avoid regressing the gdm greeter, as current code calls lock() in showDialog(), and thus pushes the 'lock-screen' mode (which is more restricted than gdm).
This patch has the right state machine.
Comment 8 Giovanni Campagna 2012-09-06 14:48:32 UTC
Created attachment 223658 [details] [review]
ScreenShield: move lock status handling to use session mode

Have distinct session modes for the lock screen and the unlock dialog,
and rework the logic in ScreenShield for mode changes, to ensure we can
compute the current mode and the new mode at each transition.

Small fix required for bug 683060 to work.
Comment 9 Jasper St. Pierre (not reading bugmail) 2012-09-06 17:24:16 UTC
Review of attachment 223658 [details] [review]:

::: js/ui/screenShield.js
@@ -651,3 @@
-        this._lockDialogGroup.scale_x = 1;
-        this._lockDialogGroup.scale_y = 1;
-

bad rebase?

@@ +703,3 @@
+            Main.sessionMode.pushMode('lock-screen');
+        else
+        // logind and doesn't know about gnome-shell internal state)

why not just put lock-screen on top of unlock-dialog?

::: js/ui/sessionMode.js
@@ +57,3 @@
+    'unlock-dialog': {
+        isLocked: true,
+        isGreeter: undefined,

true? false?

Boolean values don't have a third state.

@@ +58,3 @@
+        isLocked: true,
+        isGreeter: undefined,
+        unlockDialog: undefined,

This looks really silly and weird.

@@ +124,3 @@
     },
 
+    switchMode: function(to) {

Sort of the point of having a stack like this is to prevent shenanigans like this. Any reason you can't do a pop and push?

::: js/ui/shellDBus.js
@@ +344,3 @@
         this.parent();
 
+        Main.screenShield.connect('lock-status-changed', Lang.bind(this, function(shield, state) {

You don't use "state"?
Comment 10 Matthias Clasen 2012-09-07 16:06:41 UTC
To me, both the lock screen (without a11y) and the login screen (with a11y) look as expected in .91 - what is still missing here ?
Comment 11 Giovanni Campagna 2012-09-08 12:08:32 UTC
That the unlock dialog should behave similar to the login screen, and have a11y and input source.
Comment 12 Giovanni Campagna 2012-09-10 08:48:30 UTC
(In reply to comment #9)
> Review of attachment 223658 [details] [review]:
> 
> @@ +703,3 @@
> +            Main.sessionMode.pushMode('lock-screen');
> +        else
> +        // logind and doesn't know about gnome-shell internal state)
> 
> why not just put lock-screen on top of unlock-dialog?

Ok, let me try that.

> ::: js/ui/sessionMode.js
> @@ +57,3 @@
> +    'unlock-dialog': {
> +        isLocked: true,
> +        isGreeter: undefined,
> 
> true? false?
> 
> Boolean values don't have a third state.

Yes they have. All values have an extra state, which is "don't update the current value", although I may live without it.

> @@ +58,3 @@
> +        isLocked: true,
> +        isGreeter: undefined,
> +        unlockDialog: undefined,
> 
> This looks really silly and weird.

I could say that the session mode was not really designed to handle these cases, but I would be repeating myself...

> @@ +124,3 @@
>      },
> 
> +    switchMode: function(to) {
> 
> Sort of the point of having a stack like this is to prevent shenanigans like
> this. Any reason you can't do a pop and push?

I don't want to do useless work to enable and disable components back and forth (especially when extensions are involved, as enabling them is usually very expensive).

> ::: js/ui/shellDBus.js
> @@ +344,3 @@
>          this.parent();
> 
> +        Main.screenShield.connect('lock-status-changed', Lang.bind(this,
> function(shield, state) {
> 
> You don't use "state"?

Yeah, old stuff.
Comment 13 Giovanni Campagna 2012-09-10 09:39:07 UTC
Created attachment 223889 [details] [review]
ScreenShield: move lock status handling to use session mode

Have distinct session modes for the lock screen and the unlock dialog,
and rework the logic in ScreenShield to have the lock-screen mode stack
onto the unlock-dialog mode (where applicable)
Comment 14 Jasper St. Pierre (not reading bugmail) 2012-09-10 17:07:54 UTC
Review of attachment 223889 [details] [review]:

If you want to clean up the 'undefined' stuff, put this at the top of the file:

    const inherit = undefined;

That should make it a bit clearer. Do that in a separate commit, though.

Looks fine otherwise.
Comment 15 Giovanni Campagna 2012-09-10 19:26:53 UTC
I don't think we need inherit, there is documentation for what undefined does. And I hope
we're not changing that sessionMode code soon.
Attachment 223889 [details] pushed as 8cf9baa - ScreenShield: move lock status handling to use session mode