Skip to content

Add an option to keep the dock visible - #9

Merged
SumirSeth merged 8 commits into
mainfrom
feature/dock-always-visible
Nov 7, 2026
Merged

SumirSeth merged 8 commits into
mainfrom
feature/dock-always-visible

Conversation

@SumirSeth

@SumirSeth SumirSeth commented Nov 7, 2026 •

Copy link
Copy Markdown
Owner

Fixes #4.

Adds dock_autohide (default true) and a Keep the dock visible switch in Settings → Dock.

With it off:

  • The dock stays on the primary screen instead of sliding in from the bottom edge. It still hides for fullscreen apps and while the launcher is open, and comes back in place without sliding.
  • While Wisp hides the taskbar, a hidden app bar (SHAppBarMessage, src/dock/space.rs) keeps the dock's height free at the bottom of the primary screen, so maximized windows stop above the dock. Windows tracks that space itself: it shares the edge with other app bars, follows display changes, and frees it when the option is turned off or Wisp exits.
  • With the taskbar shown, the taskbar keeps its own space and the dock sits over it.

An earlier version edited the work area from the taskbar hider; audits found it could lose track of its space, so it was replaced by the app bar and the hider is unchanged from main.

Reliability fixes (from desktop benchmarks). The space often went missing, so maximized windows covered the dock until something unrelated made Windows recalculate. SHAppBarMessage reaches Wisp's own tray proxy and puts its shared block in Wisp's process, and Explorer then acknowledges ABM_SETPOS without recalculating the work area. The space now sends its app bar messages straight to Explorer's taskbar with the block in Explorer's process, checks every second that it is kept, and runs on its own thread: Explorer replies only after every window has seen the work area change, which froze the UI for 0.6–1.8 s per toggle. Measured after the fix: the space is kept on 4/4 fresh starts (about 0.7 s after launch) and 8/8 runtime toggles, the reload handler takes about 10 ms instead of 0.8–1.8 s, and quitting returns the full work area and the taskbar. Starting from the Start menu also no longer leaves the dock's notification area empty.

Tested on a real desktop, including apps that go fullscreen from a maximized window: the dock hides for them too.

🤖 Generated with Claude Code

SumirSeth and others added 6 commits November 7, 2026 17:35
dock_autohide = false, or Keep the dock visible in Settings, keeps the
dock on the primary screen instead of sliding it in from the bottom
edge. It still hides for fullscreen apps. While Wisp hides the taskbar,
the primary screen's work area keeps room for the dock, so maximized
windows stop above it; the space comes back when the option is off or
Wisp quits.

Fixes #4.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Remember the work area's bottom from before the dock's reservation, so
turning the option off restores it, including room another appbar
kept, instead of the whole screen. Remember a reservation only after
Windows confirms it, so a failed change can still be undone later.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Reserving the space by editing the work area meant guessing which part
of it Wisp owned, which broke when a write failed before it was
verified, when displays changed, or when another app bar used the same
edge. Register a hidden app bar along the bottom of the primary screen
instead: Windows tracks its space, shares the edge with other app bars,
follows display changes and frees the space when Wisp exits. The
taskbar hider is back to what is on main.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Register the app bar again after Explorer restarts (TaskbarCreated).
- Size it in DIPs at the primary screen's current scale, and place it
  again after display, DPI or setting changes when its size changed.
- The taskbar hider leaves the primary screen's bottom to the app bar
  instead of reclaiming the taskbar's strip over it, and after each
  hider event the app bar re-registers if the work area reaches into it.
- On quit, restore the taskbar first and remove the app bar last, so
  Windows works the work area out again from what remains.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Compare the primary screen's bounds and the strip's pixel height from the last placement, not the strip Windows negotiated, which a side app bar can narrow. A height-only resolution change now re-places it, and broadcasts that change nothing do not.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
SumirSeth and others added 2 commits November 7, 2026 19:44
"Keep the dock visible" often lost its space: maximized windows covered
the dock until something unrelated made Windows recalculate. Wisp's app
bar messages went through SHAppBarMessage, which finds Wisp's own tray
proxy and puts the shared block in Wisp's process; Explorer then answers
ABM_SETPOS without recalculating the work area. The dock's space now
sends its app bar messages straight to Explorer's taskbar with the block
in Explorer's process, and checks every second that the space is kept.

Explorer answers a message that changes the work area only after every
window has seen the change, which took 0.6 to 1.8 s on the UI thread on
each toggle. The space now lives on its own thread; Wisp waits for it
only when exiting, so the space is back before Wisp is gone.

Also:
- The taskbar hider keeps the bottom free before the space exists.
- The tray proxy forwards to Explorer with SMTO_NORMAL, so Explorer's
  broadcasts back to it are not held up while it waits.
- Wisp replies to shell broadcasts before re-hiding the taskbar.
- When the proxy wins FindWindow back after a long spell, such as
  starting from the Start menu, apps are asked to add their tray icons
  again, so the dock's notification area is not left empty.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Some apps go fullscreen without leaving the maximized state. The dock
skipped every maximized window, since a plain maximized window's resize
borders reach past the monitor, so it stayed over those apps. A
maximized window now counts as fullscreen when it fills the monitor
exactly while the work area stops short of it, which a plain maximize
cannot do.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@SumirSeth
SumirSeth marked this pull request as ready for review November 7, 2026 14:59
@SumirSeth
SumirSeth merged commit 607e0f1 into main Nov 7, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feature request: ability to keep dock visible

1 participant