Watch
1
0
Fork
You've already forked SouveraineOS
0

task: fix dock fullscreen detection for qs -p windows

This commit is contained in:
Fimeg 2026-07-21 15:04:27 -04:00
commit c725b081b5

View file

@ -0,0 +1,79 @@
# fix: dock fullscreen detection misses `qs -p` windows
## Problem
The dock (and ScreenCorners) detect fullscreen apps via:
```qml
ws.toplevels.values.filter(w => w.wayland?.fullscreen)
```
This uses Quickshell's `Hyprland.workspaces` model, which tracks toplevels through
the Wayland `ext-foreign-toplevel-list` protocol. Windows launched by `qs -p`
(souveraine-settings, and potentially other standalone quickshell processes) are
known to Hyprland (`hyprctl clients -j` shows them with `fullscreen: 2`) but do
NOT appear in `ws.toplevels.values`. The workspace reports `windows: 0` despite
a fullscreen window living on it.
Result: `activeMonitorHasFullscreen` is false, the dock falls through to the
`effectivePinned` check (pinnedOnStartup is true on the phone), returns Pinned,
and the dock renders on Overlay — covering the navigation pill on Top.
ScreenCorners use the identical detection and are also broken (visible over the
fullscreen settings app).
## Affected files
- `modules/ii/dock/Dock.qml` lines 60-64 — `activeFullscreenWorkspace` filter
- `modules/ii/screenCorners/ScreenCorners.qml` line 188 — same filter
## Fix direction
Add a hyprctl-based fallback. `HyprlandData` (in `qs.services`) already polls
`hyprctl activewindow -j` and exposes `activeWindow` with the full Hyprland
client object (including `fullscreen: 2`). When the workspace-level detection
finds no fullscreen toplevel, fall back to:
```qml
HyprlandData.activeWindow?.fullscreen === 2
```
This covers `qs -p` windows without spawning new processes (HyprlandData's
existing poll is the data source). The workspace-level check stays as primary
(faster, no IPC round-trip); the hyprctl fallback only fires when it fails.
### Dock.qml change sketch
```qml
// Existing (line 60-64):
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
// Fixed — add hyprctl fallback:
readonly property bool activeMonitorHasFullscreen: root.activeFullscreenWorkspace !== undefined
|| (HyprlandData.activeWindow?.fullscreen === 2)
```
### ScreenCorners.qml change sketch
Same pattern at line 188-189.
## Verification
1. Open souveraine-settings on the phone (goes fullscreen)
2. Confirm dock is hidden (not visible in `hyprctl -j layers`)
3. Confirm pill is visible and gestures work
4. Confirm ScreenCorners are hidden over the fullscreen app
5. Close settings — confirm dock returns to its normal state (pinned if pinnedOnStartup)
6. Confirm non-fullscreen apps still show the dock correctly
## Notes
- The dock's existing comment (line 58) says "activeToplevel.wayland.fullscreen
is NOT reliable" — this refers to the Wayland protocol path, which is exactly
what's broken. The hyprctl path IS reliable.
- `HyprlandData` is already imported by other ii modules (DockApps, TaskbarApps)
so adding it to Dock.qml and ScreenCorners.qml is consistent.
- The `qs -p` process model means any future standalone quickshell app
(settings, player, etc.) would hit the same bug without this fix.