Repository navigation
dbar: animate hiding the top bar on fullscreen in niri - #3335
steven12138 wants to merge 2 commits into
Conversation
|
/claude review |
Claude reviewTwo issues: the documented edge-hover reveal is dead in the fullscreen-only path, and the new test files ship inside the
Checked: niri workspace/active-window state fixes (string-vs-numeric key lookups, stale |
e1a5b67 to
ba5842b
Compare
|
Addressed the requested changes and rebased onto the current
Validation: 19 focused tests pass, the full logic suite passes, Qt tests pass (26/26), settings search index and i18n variant checks pass, |
|
/claude review |
|
|
||
| property bool autoHide: !barWindow.isIsland && (barConfig?.autoHide ?? false) | ||
| readonly property bool autoHide: !barWindow.isIsland && ((barConfig?.autoHide ?? false) || barWindow.fullscreenAutoHide) | ||
| onAutoHideChanged: evaluateReveal() |
There was a problem hiding this comment.
The IPC reveal state can get stuck after fullscreen ends. With global auto-hide off, run bar toggleReveal while fullscreen and barIpcRevealStates[id] becomes true. When fullscreen ends, autoHide goes false, but nothing clears that state. SettingsData.updateBarConfig only clears it when autoHide: false is written to the config. The next time a window goes fullscreen, ipcReveal is still true, so the bar doesn't hide. Outside fullscreen, toggleReveal also returns BAR_AUTO_HIDE_DISABLED, so IPC can't reset it; only hovering the bar can.
Fix: clear the state when the effective auto-hide turns off.
| onAutoHideChanged: evaluateReveal() | |
| onAutoHideChanged: { | |
| if (!autoHide) | |
| SettingsData.setBarIpcReveal(barConfig?.id ?? "", false); | |
| evaluateReveal(); | |
| } |
There was a problem hiding this comment.
Fixed in 6f84847. The Dux 2.0 DBar now clears barIpcRevealStates when effective auto-hide turns off, before evaluating reveal again. Added a regression test for the fullscreen exit/re-entry transition; the full Node and QML suites pass.
Claude reviewBoth earlier findings are fixed (edge hover now gates on
Checked: |
ba5842b to
6f84847
Compare
|
/claude review |
| layer.enabled: false | ||
|
|
||
| property bool autoHide: (!barWindow.isIsland || barWindow.islandOverlay) && (barConfig?.autoHide ?? false) | ||
| readonly property bool autoHide: ((!barWindow.isIsland || barWindow.islandOverlay) && (barConfig?.autoHide ?? false)) || barWindow.fullscreenAutoHide |
There was a problem hiding this comment.
With fullscreenAutoHide ORed into autoHide, surfaceExclusiveZone (line 805) drops to -1 whenever a fullscreen window shows up. It already does that for topBarCore.autoHide && !reserveExclusiveWhenAutoHidden, and that guard is only true for frame-hosted bars, which this feature excludes. So every fullscreen enter/exit releases and then re-reserves the bar's zone. The other windows on that output relayout both times. That contradicts the PR description and docs/fullscreen-bar.md ("preserves the configured exclusive zone, so other windows do not resize").
Fix: keep the zone while hiding for fullscreen. In the line 805 condition, use (barConfig?.autoHide ?? false) (the effective global auto-hide) instead of topBarCore.autoHide, or add && !barWindow.fullscreenAutoHide.
There was a problem hiding this comment.
Fixed in bd9f7a8. Fullscreen-only hiding now preserves the bar exclusive zone; the prior global auto-hide behavior is unchanged. Added a regression test for both cases. The matching Dux 2.0 package is installed locally, and fullscreen entry/exit works after a plain dms restart. Node: 398 passed; QML and package build passed.
Claude reviewThe port to DBar fixes the earlier findings: IPC reveal is cleared, edge hover uses the effective auto-hide, and the tests are in
Checked: the |
|
Superseded by #4000, which carries the Dux 2.0 DBar port and addresses the review findings, including the exclusive-zone regression. Continuing review there; keeping this PR closed for its review history. |
What this does
On niri, an optional per-bar Hide bar on fullscreen setting slides the top bar out of view when the active window on that output enters fullscreen. It slides back when fullscreen ends. Both transitions use DBar's existing auto-hide animation and the theme's animation duration (including disabled animations). Moving the pointer to the screen edge can reveal the bar while fullscreen.
The option requires Use overlay layer, defaults to off, and does not turn on global auto-hide or change the bar's layer. It preserves the configured exclusive zone, so other windows do not resize during the transition. Frame-hosted bars, islands, and other compositors are unaffected.
This revision ports the feature to the Dux 2.0
DBarlayout and currentmaster. It also clears the IPC reveal state when effective auto-hide ends, as requested in the latest review; otherwise a previousbar toggleRevealcould prevent hiding on the next fullscreen. The earlier edge-hover and test-embedding review findings remain addressed.The subsequent review found that fullscreen-only hiding released the bar's exclusive zone. The fix keeps the configured zone when only the fullscreen option is active, while preserving the existing global auto-hide behavior. A regression test covers both cases.
Niri IPC and Wayland toplevels have no shared window ID. Matching uses exact app ID/title on the output, with keyboard focus to disambiguate where possible. Ambiguous matches leave the bar visible. See
docs/fullscreen-bar.mdfor usage and limits.Validation
node --test quickshell/tests/*.test.mjs: 398 passed.make test-qml: Qt 31 passed, lock 38 passed, logic passed.make build: passed; embedded shell excludes tests.git diff --check: passed.make lint-qmlcould not run in this fresh worktree because Quickshell's VFS.qmlls.inihad not been generated. No new lint result is claimed.dux-shell 2.0.0-3. A plaindms restartloads the embedded patch, and fullscreen entry hides the top bar while exit restores it in a live single-monitor niri session. The user also confirmed the fullscreen behavior works on their machine.Checklist