From 5004afe62d165af36d1fc97b138432fb0d6893a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Fl=C3=B6ser?= Date: Fri, 30 Jun 2017 20:04:31 +0200 Subject: [PATCH] [lookandfeel/lockscreen] Fix state handling when clicking the keyboard's own hide button Summary: When clicking the hide button provided by the virtual keyboard, the keyboard hides, but the state is not updated. This means the animation for hide is not triggered and even more important the next call to showHide sets a wrong state. The state assumes it is in visible, when clicking it goes to hidden. So the virtual keyboard is not getting shown when clicking the show virtual keyboard button. To address this problem a change handler for keyboardActive is added which ensures the state is correct whenever the keyboardActive value changes. BUG: 381833 FIXED-IN: 5.10.4 Reviewers: #plasma, sitter Subscribers: plasma-devel Tags: #plasma Differential Revision: https://phabricator.kde.org/D6456 --- lookandfeel/contents/lockscreen/LockScreenUi.qml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lookandfeel/contents/lockscreen/LockScreenUi.qml b/lookandfeel/contents/lockscreen/LockScreenUi.qml index ddce84eee..e78b7897c 100644 --- a/lookandfeel/contents/lockscreen/LockScreenUi.qml +++ b/lookandfeel/contents/lockscreen/LockScreenUi.qml @@ -198,6 +198,14 @@ PlasmaCore.ColorScope { state = state == "hidden" ? "visible" : "hidden"; } Component.onCompleted: inputPanel.source = "../components/VirtualKeyboard.qml" + + onKeyboardActiveChanged: { + if (keyboardActive) { + state = "visible"; + } else { + state = "hidden"; + } + } states: [ State {