dock: unmount layer when hidden so it stops painting over fullscreen apps
This commit is contained in:
parent
b8369235b4
commit
b8b65273a1
1 changed files with 19 additions and 9 deletions
|
|
@ -23,6 +23,7 @@ import QtQuick.Controls
|
||||||
import QtQuick.Effects
|
import QtQuick.Effects
|
||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
import Quickshell.Io
|
import Quickshell.Io
|
||||||
|
import Quickshell.Hyprland
|
||||||
import Quickshell
|
import Quickshell
|
||||||
import Quickshell.Widgets
|
import Quickshell.Widgets
|
||||||
import Quickshell.Wayland
|
import Quickshell.Wayland
|
||||||
|
|
@ -49,13 +50,18 @@ Scope { // Scope
|
||||||
// this alias so the state computation can see it in one place.
|
// this alias so the state computation can see it in one place.
|
||||||
property bool previewShowing: false
|
property bool previewShowing: false
|
||||||
|
|
||||||
|
// App mode: any fullscreen window on the focused monitor owns the
|
||||||
|
// display, so the dock hides. ii's own screenCorners/Background use this
|
||||||
|
// same scan (activeToplevel.wayland.fullscreen is NOT reliable); mirror
|
||||||
|
// it verbatim. dockRevealPulse still overrides so swipe-up can flash it.
|
||||||
|
readonly property var focusedWorkspaces: Hyprland.workspaces.values.filter(
|
||||||
|
ws => ws.monitor && ws.monitor.name === Hyprland.focusedMonitor?.name)
|
||||||
|
readonly property var activeFullscreenWorkspace: root.focusedWorkspaces.filter(
|
||||||
|
ws => ws.active && ws.toplevels.values.filter(w => w.wayland?.fullscreen)[0] !== undefined)[0]
|
||||||
|
readonly property bool activeMonitorHasFullscreen: root.activeFullscreenWorkspace !== undefined
|
||||||
|
|
||||||
function computeDockState() {
|
function computeDockState() {
|
||||||
// App mode: a fullscreen/maximized active window owns the display.
|
if (root.activeMonitorHasFullscreen && !GlobalStates.dockRevealPulse)
|
||||||
// Suppress Peek entirely (the pulse and the empty-desktop reveal both
|
|
||||||
// yield to it) so the dock doesn't float over a fullscreen app. The
|
|
||||||
// swipe-up pulse still works to bring the dock on top for a moment.
|
|
||||||
const activeFs = ToplevelManager.activeToplevel?.wayland?.fullscreen ?? false;
|
|
||||||
if (activeFs && !GlobalStates.dockRevealPulse)
|
|
||||||
return Dock.DockState.Hidden;
|
return Dock.DockState.Hidden;
|
||||||
if (root.effectivePinned)
|
if (root.effectivePinned)
|
||||||
return Dock.DockState.Pinned;
|
return Dock.DockState.Pinned;
|
||||||
|
|
@ -135,12 +141,16 @@ Scope { // Scope
|
||||||
// Window
|
// Window
|
||||||
required property var modelData
|
required property var modelData
|
||||||
screen: modelData
|
screen: modelData
|
||||||
visible: !GlobalStates.screenLocked
|
|
||||||
|
|
||||||
// Visible for any non-Hidden state, plus the hover strip (which
|
// The dock window maps only when it should paint. This is what
|
||||||
// is a live pointer input, not a persisted state).
|
// actually hides it over a fullscreen app (a Hidden dockState
|
||||||
|
// unmounts the layer entirely) — the earlier `visible` was
|
||||||
|
// always-true and only `reveal` flipped, so the dock kept
|
||||||
|
// painting over fullscreen. hoverToReveal (mouse, off by default)
|
||||||
|
// keeps the strip alive for desktop pointer use.
|
||||||
property bool reveal: root.dockState !== Dock.DockState.Hidden
|
property bool reveal: root.dockState !== Dock.DockState.Hidden
|
||||||
|| (Config.options?.dock.hoverToReveal && dockMouseArea.containsMouse)
|
|| (Config.options?.dock.hoverToReveal && dockMouseArea.containsMouse)
|
||||||
|
visible: !GlobalStates.screenLocked && reveal
|
||||||
|
|
||||||
anchors {
|
anchors {
|
||||||
bottom: true
|
bottom: true
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue