Respect auto-hide setting for convergence dock

Dock and space reserver hid unconditionally on maximize.
Gate both on autoHidePanelsEnabled. Make the exclusive zone
constant — dynamic changes on a contentless surface never
get committed to the compositor.
This commit is contained in:
Marco Allegretti 2026-04-15 09:55:36 +02:00
parent 1cd280e32f
commit c61642265b
2 changed files with 10 additions and 4 deletions

View file

@ -181,7 +181,8 @@ ContainmentItem {
property real dockOffset: 0 property real dockOffset: 0
readonly property real dockHeight: Kirigami.Units.gridUnit * 3 readonly property real dockHeight: Kirigami.Units.gridUnit * 3
readonly property bool dockHovered: dockHoverHandler.hovered readonly property bool dockHovered: dockHoverHandler.hovered
readonly property bool shouldHide: windowMaximizedTracker.showingWindow && !dockHovered readonly property bool shouldHide: ShellSettings.Settings.autoHidePanelsEnabled
&& windowMaximizedTracker.showingWindow && !dockHovered
onShouldHideChanged: { onShouldHideChanged: {
if (shouldHide) { if (shouldHide) {

View file

@ -145,11 +145,16 @@ ContainmentItem {
// desktop) with an exclusive zone equal to the dock height so that KWin // desktop) with an exclusive zone equal to the dock height so that KWin
// shrinks MaximizeArea accordingly. Input-transparent so clicks fall // shrinks MaximizeArea accordingly. Input-transparent so clicks fall
// through to the homescreen dock underneath. // through to the homescreen dock underneath.
// When a window is maximized the exclusive zone drops to 0 so the // When auto-hide is enabled and a window is maximized the surface is
// window reclaims the full screen while the dock auto-hides. // destroyed so the strut is removed and the window reclaims the full
// screen. Dynamic exclusive-zone changes alone are not enough because
// the contentless surface never repaints, so the Wayland commit that
// would apply the new zone never happens.
Window { Window {
id: dockSpaceReserver id: dockSpaceReserver
visible: ShellSettings.Settings.convergenceModeEnabled visible: ShellSettings.Settings.convergenceModeEnabled
&& !(ShellSettings.Settings.autoHidePanelsEnabled
&& windowMaximizedTracker.showingWindow)
color: "transparent" color: "transparent"
flags: Qt.FramelessWindowHint | Qt.WindowTransparentForInput flags: Qt.FramelessWindowHint | Qt.WindowTransparentForInput
// height is set by layer-shell anchoring; provide a fallback. // height is set by layer-shell anchoring; provide a fallback.
@ -159,7 +164,7 @@ ContainmentItem {
LayerShell.Window.scope: "dock-space" LayerShell.Window.scope: "dock-space"
LayerShell.Window.layer: LayerShell.Window.LayerBottom LayerShell.Window.layer: LayerShell.Window.LayerBottom
LayerShell.Window.anchors: LayerShell.Window.AnchorBottom | LayerShell.Window.AnchorLeft | LayerShell.Window.AnchorRight LayerShell.Window.anchors: LayerShell.Window.AnchorBottom | LayerShell.Window.AnchorLeft | LayerShell.Window.AnchorRight
LayerShell.Window.exclusionZone: windowMaximizedTracker.showingWindow ? 0 : Kirigami.Units.gridUnit * 3 LayerShell.Window.exclusionZone: Kirigami.Units.gridUnit * 3
LayerShell.Window.keyboardInteractivity: LayerShell.Window.KeyboardInteractivityNone LayerShell.Window.keyboardInteractivity: LayerShell.Window.KeyboardInteractivityNone
} }