~ci-train-bot/unity8/unity8-ubuntu-yakkety-landing-055

« back to all changes in this revision

Viewing changes to qml/Greeter/NarrowView.qml

  • Committer: Bileto Bot
  • Author(s): Michael Terry
  • Date: 2016-07-11 17:23:38 UTC
  • mfrom: (1789.9.15 greeter-focus-true)
  • Revision ID: ci-train-bot@canonical.com-20160711172338-17q0ven6n973k5v8
Fix tablet greeter focus to be always-on, no longer hiding the OSK or forcing a mouse click to type a password.

I've also squeezed some other small fixes in:

- Support Up and Down keys in user list.
- Don't accept non-digit characters when prompting for passcode (we ask OSK to show only digits, but due to bug 1586435, it shows other characters too; plus if the user has an external keyboard, they can type anything anyway).
- When prompting for a passcode in wide-view (tablet/desktop), stop at 4 digits just like we do in narrow-view.
- Don't show "Retry" during brief period before a prompt comes in from PAM.
- Don't let user drag user list if there's only one entry.

Now as for the focus changes...

One of the big reasons we lost keyboard focus before was because we set the shell to disabled whenever the greeter was "between PAM events" -- mostly so that the user can't swipe away greeter before we get our first prompt or are otherwise unsure about exactly what authentication is needed.

But disabled qml items can't be focused.  So I've rejiggered things a bit.  Instead of disabling the whole shell, I just disable the launcher, the indicators, and make the greeter non-swipeable.

I also do some tricks with the prompt so that it looks disabled (while we check with PAM about the password) but isn't actually.  I don't want to make it look to the user that pressing backspace while they wait for PAM does anything, so after the user presses Enter, I present a fake label on top of the prompt that looks like a disabled prompt, while simultaneously hiding the prompt contents. (LP: #1435923)

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
    property bool alphanumeric
32
32
    property var userModel // unused
33
33
    property alias infographicModel: coverPage.infographicModel
 
34
    property bool waiting
34
35
    readonly property bool fullyShown: coverPage.showProgress === 1 || lockscreen.shown
35
36
    readonly property bool required: coverPage.required || lockscreen.required
36
37
    readonly property bool animating: coverPage.showAnimation.running || coverPage.hideAnimation.running
71
72
        if (!alphanumeric && showFakePassword) {
72
73
            lockscreen.showText("...."); // actual text doesn't matter, we show bullets
73
74
        }
74
 
        lockscreen.hide();
75
75
    }
76
76
 
77
77
    function notifyAuthenticationFailed() {
172
172
        height: parent.height
173
173
        width: parent.width
174
174
        background: root.background
 
175
        draggable: !root.waiting
175
176
        onTease: root.tease()
176
177
        onClicked: hide()
177
178