From 18c00d40b4fedfa45e5a4b2c4a00f0e7185508a4 Mon Sep 17 00:00:00 2001 From: Asmir A Date: Sat, 1 Aug 2026 17:48:39 +0200 Subject: [PATCH] stay above osk --- modules/BluetoothPanel.qml | 11 ++++++++--- modules/ConfirmDialog.qml | 6 +++++- modules/Launcher.qml | 19 +++++++++++++++---- modules/PowerPanel.qml | 9 +++++++-- modules/WifiPanel.qml | 11 ++++++++--- 5 files changed, 43 insertions(+), 13 deletions(-) diff --git a/modules/BluetoothPanel.qml b/modules/BluetoothPanel.qml index acad8fa..b7c087a 100644 --- a/modules/BluetoothPanel.qml +++ b/modules/BluetoothPanel.qml @@ -32,9 +32,14 @@ PanelWindow { top: true bottom: true } - exclusionMode: ExclusionMode.Ignore + // Reserve nothing, respect what others reserved — see Launcher.qml. Keeps + // the menu clear of the bar and of an on-screen keyboard. + exclusionMode: ExclusionMode.Normal + exclusiveZone: 0 color: "transparent" + readonly property int barInset: Config.reserveSpace ? 0 : Theme.barHeight + // ---- Data ------------------------------------------------------------ readonly property BluetoothAdapter adapter: Bluetooth.defaultAdapter @@ -101,10 +106,10 @@ PanelWindow { right: parent.right bottom: parent.bottom rightMargin: Theme.padding - bottomMargin: Theme.barHeight + Theme.padding + bottomMargin: root.barInset + Theme.padding } - readonly property int maxHeight: Math.min(Config.bluetoothMenuHeight, root.height - Theme.barHeight - Theme.padding * 2) + readonly property int maxHeight: Math.min(Config.bluetoothMenuHeight, root.height - root.barInset - Theme.padding * 2) readonly property int bodyHeight: root.adapterOn && list.count > 0 ? list.contentHeight : 48 width: Math.min(Config.bluetoothMenuWidth, root.width - Theme.padding * 2) diff --git a/modules/ConfirmDialog.qml b/modules/ConfirmDialog.qml index 64720a1..83a2405 100644 --- a/modules/ConfirmDialog.qml +++ b/modules/ConfirmDialog.qml @@ -26,7 +26,11 @@ PanelWindow { top: true bottom: true } - exclusionMode: ExclusionMode.Ignore + // Reserve nothing, respect what others reserved — see Launcher.qml. The + // dialog is centred, so this also keeps it centred in the space actually + // left over rather than behind an on-screen keyboard. + exclusionMode: ExclusionMode.Normal + exclusiveZone: 0 color: "#66000000" function accept(): void { diff --git a/modules/Launcher.qml b/modules/Launcher.qml index 4ec1d9a..7cd4511 100644 --- a/modules/Launcher.qml +++ b/modules/Launcher.qml @@ -30,9 +30,19 @@ PanelWindow { top: true bottom: true } - exclusionMode: ExclusionMode.Ignore + // Reserve nothing, but stay inside what everything else has reserved: the + // surface then ends at the top of the bar, and at the top of an on-screen + // keyboard like squeekboard whenever one is up, so the menu rises with it + // instead of opening underneath. `Ignore` would cover the whole output. + exclusionMode: ExclusionMode.Normal + exclusiveZone: 0 color: "transparent" + // What is left of the bar to step over by hand. Nothing, normally — the + // exclusive zone above already takes it out of the surface. Only a bar + // configured not to reserve space still overlaps. + readonly property int barInset: Config.reserveSpace ? 0 : Theme.barHeight + // ---- Data ------------------------------------------------------------ readonly property var categories: ["All", "Development", "Games", "Graphics", "Internet", "Multimedia", "Office", "Science", "System", "Utility", "Other"] @@ -129,13 +139,14 @@ PanelWindow { left: parent.left bottom: parent.bottom leftMargin: Theme.padding - bottomMargin: Theme.barHeight + Theme.padding + bottomMargin: root.barInset + Theme.padding } - // Never taller or wider than the screen, so a rotated or small output + // Never taller or wider than the space the compositor gave us, so a + // rotated or small output — or one with a keyboard taking half of it — // still shows a usable menu. width: Math.min(Config.launcherWidth, root.width - Theme.padding * 2) - height: Math.min(Config.launcherHeight, root.height - Theme.barHeight - Theme.padding * 2) + height: Math.min(Config.launcherHeight, root.height - root.barInset - Theme.padding * 2) color: Theme.surface radius: Theme.radius * 2 diff --git a/modules/PowerPanel.qml b/modules/PowerPanel.qml index 80e5ea5..ba4c66e 100644 --- a/modules/PowerPanel.qml +++ b/modules/PowerPanel.qml @@ -33,9 +33,14 @@ PanelWindow { top: true bottom: true } - exclusionMode: ExclusionMode.Ignore + // Reserve nothing, respect what others reserved — see Launcher.qml. Keeps + // the menu clear of the bar and of an on-screen keyboard. + exclusionMode: ExclusionMode.Normal + exclusiveZone: 0 color: "transparent" + readonly property int barInset: Config.reserveSpace ? 0 : Theme.barHeight + readonly property var actions: Config.powerActions property int current: 0 @@ -87,7 +92,7 @@ PanelWindow { right: parent.right bottom: parent.bottom rightMargin: Theme.padding - bottomMargin: Theme.barHeight + Theme.padding + bottomMargin: root.barInset + Theme.padding } width: Math.min(Config.powerMenuWidth, root.width - Theme.padding * 2) diff --git a/modules/WifiPanel.qml b/modules/WifiPanel.qml index 6ab39b9..543bf33 100644 --- a/modules/WifiPanel.qml +++ b/modules/WifiPanel.qml @@ -34,9 +34,14 @@ PanelWindow { top: true bottom: true } - exclusionMode: ExclusionMode.Ignore + // Reserve nothing, respect what others reserved — see Launcher.qml. Keeps + // the menu clear of the bar and of an on-screen keyboard. + exclusionMode: ExclusionMode.Normal + exclusiveZone: 0 color: "transparent" + readonly property int barInset: Config.reserveSpace ? 0 : Theme.barHeight + // ---- Data ------------------------------------------------------------ readonly property WifiDevice device: Networking.devices.values.find(d => d.type === DeviceType.Wifi) ?? null @@ -197,10 +202,10 @@ PanelWindow { right: parent.right bottom: parent.bottom rightMargin: Theme.padding - bottomMargin: Theme.barHeight + Theme.padding + bottomMargin: root.barInset + Theme.padding } - readonly property int maxHeight: Math.min(Config.wifiMenuHeight, root.height - Theme.barHeight - Theme.padding * 2) + readonly property int maxHeight: Math.min(Config.wifiMenuHeight, root.height - root.barInset - Theme.padding * 2) readonly property int bodyHeight: root.wifiOn && list.count > 0 ? list.contentHeight : 48 readonly property int footerHeight: footer.visible ? footer.height + Theme.padding : 0