mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 06:13:09 +00:00
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:
parent
1cd280e32f
commit
c61642265b
2 changed files with 10 additions and 4 deletions
|
|
@ -181,7 +181,8 @@ ContainmentItem {
|
|||
property real dockOffset: 0
|
||||
readonly property real dockHeight: Kirigami.Units.gridUnit * 3
|
||||
readonly property bool dockHovered: dockHoverHandler.hovered
|
||||
readonly property bool shouldHide: windowMaximizedTracker.showingWindow && !dockHovered
|
||||
readonly property bool shouldHide: ShellSettings.Settings.autoHidePanelsEnabled
|
||||
&& windowMaximizedTracker.showingWindow && !dockHovered
|
||||
|
||||
onShouldHideChanged: {
|
||||
if (shouldHide) {
|
||||
|
|
|
|||
|
|
@ -145,11 +145,16 @@ ContainmentItem {
|
|||
// desktop) with an exclusive zone equal to the dock height so that KWin
|
||||
// shrinks MaximizeArea accordingly. Input-transparent so clicks fall
|
||||
// through to the homescreen dock underneath.
|
||||
// When a window is maximized the exclusive zone drops to 0 so the
|
||||
// window reclaims the full screen while the dock auto-hides.
|
||||
// When auto-hide is enabled and a window is maximized the surface is
|
||||
// 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 {
|
||||
id: dockSpaceReserver
|
||||
visible: ShellSettings.Settings.convergenceModeEnabled
|
||||
&& !(ShellSettings.Settings.autoHidePanelsEnabled
|
||||
&& windowMaximizedTracker.showingWindow)
|
||||
color: "transparent"
|
||||
flags: Qt.FramelessWindowHint | Qt.WindowTransparentForInput
|
||||
// height is set by layer-shell anchoring; provide a fallback.
|
||||
|
|
@ -159,7 +164,7 @@ ContainmentItem {
|
|||
LayerShell.Window.scope: "dock-space"
|
||||
LayerShell.Window.layer: LayerShell.Window.LayerBottom
|
||||
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
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue