Keep status bar visible in convergence mode

The status bar was hidden whenever a window was showing because
the fullscreen property evaluated autoHidePanelsEnabled without
checking convergence mode.  Return false from fullscreen when
convergence is active so the bar stays on screen.

Use WindowsGoBelow visibility mode in convergence so PanelView
does not manage the exclusive zone (it would fight with the
LayerOverlay layer set by QML).  Add a separate layer-shell
surface at LayerBottom with an exclusive zone matching the bar
height, following the same pattern as the dock space reserver.
Re-run setWindowProperties on convergence mode changes.
This commit is contained in:
Marco Allegretti 2026-04-11 13:25:26 +02:00
parent 86b34878c7
commit 9e60c0e923

View file

@ -39,6 +39,11 @@ ContainmentItem {
// Whether the currently showing app is in "fullscreen"
readonly property bool fullscreen: {
// In convergence mode the status bar is always visible, like a desktop panel.
if (ShellSettings.Settings.convergenceModeEnabled) {
return false;
}
if (windowMaximizedTracker.isCurrentWindowFullscreen) {
return true;
}
@ -76,7 +81,7 @@ ContainmentItem {
root.panel.thickness = root.panelHeight;
root.panel.thickness = root.panelHeight;
root.panel.visibilityMode = ShellSettings.Settings.autoHidePanelsEnabled ? 3 : 0;
root.panel.visibilityMode = (ShellSettings.Settings.autoHidePanelsEnabled || ShellSettings.Settings.convergenceModeEnabled) ? 3 : 0;
MobileShell.ShellUtil.setWindowLayer(root.panel, LayerShell.Window.LayerOverlay)
root.updateTouchArea();
}
@ -114,12 +119,36 @@ ContainmentItem {
function onAutoHidePanelsEnabledChanged() {
root.setWindowProperties();
}
function onConvergenceModeEnabledChanged() {
root.setWindowProperties();
}
}
Component.onCompleted: {
root.setWindowProperties();
}
// Invisible layer-shell surface that reserves screen space for the
// status bar in convergence mode. The panel itself uses WindowsGoBelow
// (exclusiveZone -1) so it stays above windows; this separate surface
// at LayerBottom provides the actual exclusive zone so KWin shrinks
// MaximizeArea by the panel height.
Window {
id: topBarSpaceReserver
visible: ShellSettings.Settings.convergenceModeEnabled
color: "transparent"
flags: Qt.FramelessWindowHint | Qt.WindowTransparentForInput
height: root.panelHeight
width: 1
LayerShell.Window.scope: "topbar-space"
LayerShell.Window.layer: LayerShell.Window.LayerBottom
LayerShell.Window.anchors: LayerShell.Window.AnchorTop | LayerShell.Window.AnchorLeft | LayerShell.Window.AnchorRight
LayerShell.Window.exclusionZone: root.panelHeight
LayerShell.Window.keyboardInteractivity: LayerShell.Window.KeyboardInteractivityNone
}
// Visual panel component
StatusPanel {
id: statusPanel