Use the system's virtual keyboard instead of relying on QtVirtualKeyboard specifically for the lock screen. It means less code (when we can remove the virtual keyboard part), better integration and one dependency less.wilder-5.22
parent
5226173795
commit
4ffc72cd45
6 changed files with 70 additions and 7 deletions
@ -0,0 +1,12 @@ |
||||
/*
|
||||
* SPDX-FileCopyrightText: 2021 Aleix Pol Gonzalez <aleixpol@kde.org> |
||||
* |
||||
* SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL |
||||
*/ |
||||
|
||||
#include "virtualkeyboard.h" |
||||
|
||||
KwinVirtualKeyboardInterface::KwinVirtualKeyboardInterface() |
||||
: OrgKdeKwinVirtualKeyboardInterface(QStringLiteral("org.kde.KWin"), QStringLiteral("/VirtualKeyboard"), QDBusConnection::sessionBus()) |
||||
{ |
||||
} |
||||
@ -0,0 +1,18 @@ |
||||
/*
|
||||
* SPDX-FileCopyrightText: 2021 Aleix Pol Gonzalez <aleixpol@kde.org> |
||||
* |
||||
* SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL |
||||
*/ |
||||
|
||||
#pragma once |
||||
|
||||
#include "virtualkeyboard_interface.h" |
||||
|
||||
class KwinVirtualKeyboardInterface : public OrgKdeKwinVirtualKeyboardInterface |
||||
{ |
||||
Q_OBJECT |
||||
Q_PROPERTY(bool active READ active WRITE setActive NOTIFY activeChanged) |
||||
Q_PROPERTY(bool enabled READ enabled WRITE setEnabled NOTIFY enabledChanged) |
||||
public: |
||||
KwinVirtualKeyboardInterface(); |
||||
}; |
||||
@ -0,0 +1,24 @@ |
||||
/* |
||||
* SPDX-FileCopyrightText: 2021 Aleix Pol Gonzalez <aleixpol@kde.org> |
||||
* |
||||
* SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL |
||||
*/ |
||||
|
||||
import QtQuick 2.15 |
||||
import org.kde.plasma.workspace.keyboardlayout 1.0 as Keyboards |
||||
|
||||
Item { |
||||
id: inputPanel |
||||
readonly property bool active: Qt.inputMethod.visible |
||||
property bool activated: false |
||||
visible: Qt.inputMethod.visible |
||||
|
||||
x: Qt.inputMethod.keyboardRectangle.x |
||||
y: Qt.inputMethod.keyboardRectangle.y |
||||
height: Qt.inputMethod.keyboardRectangle.height |
||||
width: Qt.inputMethod.keyboardRectangle.width |
||||
|
||||
onActivatedChanged: if (activated) { |
||||
Keyboards.KWinVirtualKeyboard.enabled = true |
||||
} |
||||
} |
||||
Loading…
Reference in new issue