From b41a80466add9c066c23a939d5fdc76965feb866 Mon Sep 17 00:00:00 2001 From: Devin Lin Date: Fri, 11 Jul 2025 00:17:57 -0400 Subject: [PATCH] taskpanel: Use 'visible' to check keyboard state, not 'active' The virtual keyboard can be active but not visible. We want to use the visibile property when determining whether there is a keyboard visually showing. --- containments/taskpanel/qml/NavigationPanelComponent.qml | 8 ++++---- containments/taskpanel/qml/main.qml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/containments/taskpanel/qml/NavigationPanelComponent.qml b/containments/taskpanel/qml/NavigationPanelComponent.qml index 045ef199..4c8e0e90 100644 --- a/containments/taskpanel/qml/NavigationPanelComponent.qml +++ b/containments/taskpanel/qml/NavigationPanelComponent.qml @@ -86,13 +86,13 @@ MobileShell.NavigationPanel { rightAction: MobileShell.NavigationPanelAction { id: closeAppAction - enabled: Keyboards.KWinVirtualKeyboard.active || WindowPlugin.WindowUtil.hasCloseableActiveWindow - iconSource: Keyboards.KWinVirtualKeyboard.active ? "go-down-symbolic" : "mobile-close-app" + enabled: Keyboards.KWinVirtualKeyboard.visible || WindowPlugin.WindowUtil.hasCloseableActiveWindow + iconSource: Keyboards.KWinVirtualKeyboard.visible ? "go-down-symbolic" : "mobile-close-app" // mobile-close-app (from plasma-frameworks) seems to have fewer margins than icons from breeze-icons - iconSizeFactor: Keyboards.KWinVirtualKeyboard.active ? 1 : 0.75 + iconSizeFactor: Keyboards.KWinVirtualKeyboard.visible ? 1 : 0.75 onTriggered: { - if (Keyboards.KWinVirtualKeyboard.active) { + if (Keyboards.KWinVirtualKeyboard.visible) { // close keyboard if it is open Keyboards.KWinVirtualKeyboard.active = false; } else if (WindowPlugin.WindowUtil.hasCloseableActiveWindow) { diff --git a/containments/taskpanel/qml/main.qml b/containments/taskpanel/qml/main.qml index 888708ec..2cac5862 100644 --- a/containments/taskpanel/qml/main.qml +++ b/containments/taskpanel/qml/main.qml @@ -172,7 +172,7 @@ ContainmentItem { Kirigami.Theme.colorSet: root.opaqueBar ? Kirigami.Theme.Window : Kirigami.Theme.Complementary Kirigami.Theme.inherit: false - color: navigationPanel.state == "default" && (Keyboards.KWinVirtualKeyboard.active || root.opaqueBar) ? Kirigami.Theme.backgroundColor : "transparent" + color: navigationPanel.state == "default" && (Keyboards.KWinVirtualKeyboard.visible || root.opaqueBar) ? Kirigami.Theme.backgroundColor : "transparent" property real offset: 0