1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-24 21:42:51 -05:00

Fixes for better Virtual keyboard support and Workspace Switcher (#155)

* Disabling workspace animation if too many icons

* Fixed virtual keyboard on popups and modals

- Fixed VK sometimes appearing under popups and modals (that made the
keyboard unusable)
- Fixed VK not working on app drawer
- Left comments for future changes

* Added explanation for disabling animation

* Fixes comments
This commit is contained in:
Aleksandr Lebedev
2025-09-04 16:34:42 +02:00
committed by GitHub
parent eecbd8c733
commit e64124cce3
4 changed files with 18 additions and 3 deletions

View File

@@ -60,7 +60,7 @@ PanelWindow {
visible: shouldBeVisible visible: shouldBeVisible
color: "transparent" color: "transparent"
WlrLayershell.layer: WlrLayershell.Overlay WlrLayershell.layer: WlrLayershell.Top // if set to overlay -> virtual keyboards can be stuck under modal
WlrLayershell.exclusiveZone: -1 WlrLayershell.exclusiveZone: -1
WlrLayershell.keyboardFocus: shouldHaveFocus ? WlrKeyboardFocus.Exclusive : WlrKeyboardFocus.None WlrLayershell.keyboardFocus: shouldHaveFocus ? WlrKeyboardFocus.Exclusive : WlrKeyboardFocus.None
onVisibleChanged: { onVisibleChanged: {

View File

@@ -15,6 +15,9 @@ DankPopout {
property string triggerSection: "left" property string triggerSection: "left"
property var triggerScreen: null property var triggerScreen: null
// Setting to Exclusive, so virtual keyboards can send input to app drawer
WlrLayershell.keyboardFocus: shouldBeVisible ? WlrKeyboardFocus.Exclusive : WlrKeyboardFocus.None
function show() { function show() {
open() open()
} }

View File

@@ -372,6 +372,8 @@ Rectangle {
} }
Behavior on width { Behavior on width {
// When having more icons, animation becomes clunky
enabled: (!SettingsData.showWorkspaceApps || SettingsData.maxWorkspaceIcons <= 3)
NumberAnimation { NumberAnimation {
duration: Theme.mediumDuration duration: Theme.mediumDuration
easing.type: Theme.emphasizedEasing easing.type: Theme.emphasizedEasing
@@ -379,6 +381,8 @@ Rectangle {
} }
Behavior on color { Behavior on color {
// When having more icons, animation becomes clunky
enabled: (!SettingsData.showWorkspaceApps || SettingsData.maxWorkspaceIcons <= 3)
ColorAnimation { ColorAnimation {
duration: Theme.mediumDuration duration: Theme.mediumDuration
easing.type: Theme.emphasizedEasing easing.type: Theme.emphasizedEasing

View File

@@ -54,8 +54,16 @@ PanelWindow {
} }
color: "transparent" color: "transparent"
WlrLayershell.layer: WlrLayershell.Overlay WlrLayershell.layer: WlrLayershell.Top // if set to overlay -> virtual keyboards can be stuck under popup
WlrLayershell.exclusiveZone: -1 WlrLayershell.exclusiveZone: -1
// WlrLayershell.keyboardFocus should be set to Exclusive,
// if popup contains input fields and does NOT create new popups/modals
// with input fields.
// With OnDemand virtual keyboards can't send input to popup
// If set to Exclusive AND this popup creates other popups, that also have
// input fields -> they can't get keyboard focus, because the parent popup
// already took the lock
WlrLayershell.keyboardFocus: shouldBeVisible ? WlrKeyboardFocus.OnDemand : WlrKeyboardFocus.None WlrLayershell.keyboardFocus: shouldBeVisible ? WlrKeyboardFocus.OnDemand : WlrKeyboardFocus.None
anchors { anchors {