From f741419c26a05e670074a5e7f4a3fd5a2b6b623e Mon Sep 17 00:00:00 2001 From: Aleix Pol Date: Thu, 22 Jul 2021 00:03:16 +0200 Subject: [PATCH] KeyboardLayout: Expose the new org.kde.kwin.VirtualKeyboard.visible property --- components/keyboardlayout/keyboardlayoutplugin.cpp | 2 +- components/keyboardlayout/virtualkeyboard.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/components/keyboardlayout/keyboardlayoutplugin.cpp b/components/keyboardlayout/keyboardlayoutplugin.cpp index 50b0d3f82..932cc281c 100644 --- a/components/keyboardlayout/keyboardlayoutplugin.cpp +++ b/components/keyboardlayout/keyboardlayoutplugin.cpp @@ -31,7 +31,7 @@ void KeyboardLayoutPlugin::registerTypes(const char *uri) Q_ASSERT(uri == QLatin1String("org.kde.plasma.workspace.keyboardlayout")); qmlRegisterType(uri, 1, 0, "KeyboardLayout"); - qmlRegisterSingletonType(uri, 1, 0, "KWinVirtualKeyboard", [](QQmlEngine *, QJSEngine *) -> QObject * { + qmlRegisterSingletonType(uri, 1, 0, "KWinVirtualKeyboard", [](QQmlEngine *, QJSEngine *) -> QObject * { return new KwinVirtualKeyboardInterface; }); } diff --git a/components/keyboardlayout/virtualkeyboard.h b/components/keyboardlayout/virtualkeyboard.h index 4f52d38ac..a580acc7d 100644 --- a/components/keyboardlayout/virtualkeyboard.h +++ b/components/keyboardlayout/virtualkeyboard.h @@ -13,6 +13,7 @@ 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) + Q_PROPERTY(bool visible READ visible NOTIFY visibleChanged) public: KwinVirtualKeyboardInterface(); };