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 740043 - password frequently gets shown when unlocking screen
password frequently gets shown when unlocking screen
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: lock-screen
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
: 773465 774040 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2014-11-13 01:14 UTC by Ray Strode [halfline]
Modified: 2016-11-07 19:02 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
popupMenu: don't handle key presses directly if there are modifiers (3.05 KB, patch)
2016-10-26 14:49 UTC, Ray Strode [halfline]
none Details | Review
popupMenu: don't handle key presses directly if there are modifiers (3.05 KB, patch)
2016-10-26 18:02 UTC, Ray Strode [halfline]
committed Details | Review

Description Ray Strode [halfline] 2014-11-13 01:14:33 UTC
I recently changed my password to one that ends with a symbol.  I'm kind of a
sloppy typist and will often hold down shift a little too long after typing the
symbol.  Shift-Enter brings up the context menu with one available option "Show Text".  For some reason, a fair percentage of the time I end up hitting Enter a second time and showing my password.  

Not sure what the right answer is.  A few ideas:

a) maybe we should use shift-f10 instead of shift-enter to bring up the context menu?
b) maybe we should require arrowing down once the menu is shown
c) maybe i should change my password to not end in a symbol
d) maybe i should be less sloppy when i type
Comment 1 Florian Müllner 2014-11-13 12:38:17 UTC
(In reply to comment #0)
> Not sure what the right answer is.  A few ideas:
> 
> a) maybe we should use shift-f10 instead of shift-enter to bring up the context
> menu?

It's actually supposed to be shift-f10[0] - no idea where shift-enter comes from, but I can indeed reproduce the issue (also with the search entry)...

[0] https://git.gnome.org/browse/gnome-shell/tree//src/st/st-widget.c#n741
Comment 2 Ray Strode [halfline] 2016-10-25 14:58:14 UTC
*** Bug 773465 has been marked as a duplicate of this bug. ***
Comment 3 Marius Gedminas 2016-10-26 05:36:55 UTC
Curiously, I can get Shift-Enter to act as the Menu key in the following places

- login screen password entry
- looking glass expression entry

but it acts as a regular Enter key in the following places:

- overview search box
- Alt-F2 run dialog entry box
Comment 4 Marius Gedminas 2016-10-26 07:06:36 UTC
Found it!  Shift-Enter (and also Alt-Enter/Ctrl-Enter) causes this bit of JavaScript in PopupMenu._onKeyPress() to call this.toggle(), which shows the popup menu: https://git.gnome.org/browse/gnome-shell/tree/js/ui/popupMenu.js#n787
Comment 5 Ray Strode [halfline] 2016-10-26 14:45:49 UTC
oh great, thanks for looking into it
Comment 6 Ray Strode [halfline] 2016-10-26 14:49:20 UTC
Created attachment 338530 [details] [review]
popupMenu: don't handle key presses directly if there are modifiers

commit 1d58ea25ab6f0472bdeffc9170ece37d5dd71e64 changed the
popupMenu code to handle key presses on source actors directly.

This fixed keynav into the session gear menu at the login screen.

Unfortunately, it also causes spurious pop ups if a modifier happens
to be held down.

This commit checks for modifiers and short circuits the up front
key handling if any are found.
Comment 7 Ray Strode [halfline] 2016-10-26 14:49:56 UTC
Marius do you mind trying the (as of yet) untested patch in attachment 338530 [details] [review] ?
Comment 8 Marius Gedminas 2016-10-26 16:22:23 UTC
Review of attachment 338530 [details] [review]:

::: js/ui/popupMenu.js
@@ -786,0 +786,6 @@
+        let state = event.get_state();
+
+        // if user has a modifier down (except capslock)
... 3 more ...

Shouldn't this be

    state &= ~Clutter.ModifierType.LOCK_MASK;

?
Comment 9 Ray Strode [halfline] 2016-10-26 18:00:10 UTC
(In reply to Marius Gedminas from comment #8)
> Shouldn't this be
> 
>     state &= ~Clutter.ModifierType.LOCK_MASK;

Yes! :-)
Comment 10 Ray Strode [halfline] 2016-10-26 18:02:27 UTC
Created attachment 338538 [details] [review]
popupMenu: don't handle key presses directly if there are modifiers

commit 1d58ea25ab6f0472bdeffc9170ece37d5dd71e64 changed the
popupMenu code to handle key presses on source actors directly.

This fixed keynav into the session gear menu at the login screen.

Unfortunately, it also causes spurious pop ups if a modifier happens
to be held down.

This commit checks for modifiers and short circuits the up front
key handling if any are found.
Comment 11 Ray Strode [halfline] 2016-10-26 18:02:45 UTC
(still untested)
Comment 12 Marius Gedminas 2016-10-27 05:57:38 UTC
I've tested the updated patch (with jhbuilt gnome-shell in the 3.22 branch).  It works fine (by which I mean Shift-Enter in looking glass and the lock screen doesn't open the popup menu, it acts as a regular Enter).
Comment 13 Florian Müllner 2016-10-27 12:37:29 UTC
Review of attachment 338538 [details] [review]:

OK
Comment 14 Ray Strode [halfline] 2016-11-07 15:21:18 UTC
*** Bug 774040 has been marked as a duplicate of this bug. ***
Comment 15 Ray Strode [halfline] 2016-11-07 19:02:06 UTC
Attachment 338538 [details] pushed as e33c68a - popupMenu: don't handle key presses directly if there are modifiers