From d0262d0dd86ee3f6cf6234063217957a657e7624 Mon Sep 17 00:00:00 2001 From: Marco Allegretti Date: Tue, 26 May 2026 17:27:44 +0200 Subject: [PATCH] Stop double-reserving top chrome Keep the convergence panel hit area non-reserving so the explicit topbar-space surface remains the only top strut. --- containments/panel/qml/main.qml | 7 +++---- tests/check-convergence-dock-invariant.sh | 8 +++++++- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/containments/panel/qml/main.qml b/containments/panel/qml/main.qml index 8af38158..a47eff99 100644 --- a/containments/panel/qml/main.qml +++ b/containments/panel/qml/main.qml @@ -96,7 +96,7 @@ ContainmentItem { root.panel.thickness = root.panelHeight; root.panel.thickness = root.panelHeight; - root.panel.visibilityMode = (!ShellSettings.Settings.convergenceModeEnabled && ShellSettings.Settings.autoHidePanelsEnabled) ? 3 : 0; + root.panel.visibilityMode = (ShellSettings.Settings.convergenceModeEnabled || ShellSettings.Settings.autoHidePanelsEnabled) ? 3 : 0; MobileShell.ShellUtil.setWindowLayer(root.panel, LayerShell.Window.LayerOverlay) root.updateTouchArea(); } @@ -152,9 +152,8 @@ ContainmentItem { } // Invisible layer-shell surface that reserves screen space for the - // status bar in convergence mode. The visible convergence top bar is - // rendered by Folio's unified chrome surface; this window only shrinks - // KWin's MaximizeArea. + // convergence status bar and one frame inset. The panel window itself + // stays non-reserving so this is the only top strut. Window { id: topBarSpaceReserver visible: ShellSettings.Settings.convergenceModeEnabled && !ShellSettings.Settings.gamingModeEnabled diff --git a/tests/check-convergence-dock-invariant.sh b/tests/check-convergence-dock-invariant.sh index 8caf9fe7..b2a670bc 100644 --- a/tests/check-convergence-dock-invariant.sh +++ b/tests/check-convergence-dock-invariant.sh @@ -51,7 +51,7 @@ require_line "$constants" "readonly property real convergenceWorkspaceFrameRadiu require_line "$panel" "readonly property real convergenceWorkspaceFrameThickness:" require_line "$panel" "root.panel.location = PlasmaCore.Types.TopEdge" require_line "$panel" "root.panel.offset = 0" -require_line "$panel" "root.panel.visibilityMode = (!ShellSettings.Settings.convergenceModeEnabled && ShellSettings.Settings.autoHidePanelsEnabled) ? 3 : 0" +require_line "$panel" "root.panel.visibilityMode = (ShellSettings.Settings.convergenceModeEnabled || ShellSettings.Settings.autoHidePanelsEnabled) ? 3 : 0" require_line "$panel" "readonly property real topBarHeight: gamingMode ? 0 : MobileShell.Constants.topPanelHeight" require_line "$panel" "readonly property real topBarInputHeight: topBarHeight + convergenceWorkspaceFrameThickness" require_line "$panel" "? 0" @@ -119,6 +119,12 @@ require_line "$folio_main" "readonly property real workAreaY: topBarHitHeight" require_line "$folio_main" "readonly property real workAreaWidth: Math.max(0, width - frameThickness * 2)" require_line "$folio_main" "readonly property real workAreaHeight: Math.max(0, height - topBarHeight - dockHeight - frameThickness * 2)" require_line "$folio_main" "fillRule: ShapePath.OddEvenFill" + +if grep -Fq "root.panel.visibilityMode = (!ShellSettings.Settings.convergenceModeEnabled && ShellSettings.Settings.autoHidePanelsEnabled) ? 3 : 0" "$panel"; then + echo "Convergence panel hit area must not reserve extra top space" >&2 + exit 1 +fi + require_line "$folio_main" "PathLine { x: convergenceChrome.width; y: convergenceChrome.height - convergenceChrome.dockHeight }" require_line "$folio_main" "PathLine { x: 0; y: convergenceChrome.height - convergenceChrome.dockHeight }" require_line "$folio_main" "PathArc { x: convergenceChrome.workAreaX + convergenceChrome.workAreaWidth - convergenceChrome.frameRadius; y: convergenceChrome.workAreaY + convergenceChrome.workAreaHeight; radiusX: convergenceChrome.frameRadius; radiusY: convergenceChrome.frameRadius }"