You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add command/window/toggleFrontBack and command/app/toggleFrontBack
Stateless z-order toggle: if the focused window is the global topmost,
the toggle sends it (or the whole app) to the back; otherwise, it brings
it to the front. The current state is read from the live z-order on
every call — no saved state. Bumps version to 6.4.2 (patch — additive).
- New shared pure helper `tiling::is_window_at_front(focused_id, &z)`
takes a front-to-back z-ordered list and returns true iff focused_id
is the first entry. Each platform builds its own front-to-back list
before calling — keeps the toggle semantic identical across platforms
and is fully testable without a window server.
- macOS: CGWindowListCopyWindowInfo (already front-to-back).
- Windows: EnumWindows filtered by IsWindowVisible +
should_skip_system_window (Program Manager, TextInputHost, etc.).
- Linux/X11: _NET_CLIENT_LIST_STACKING reversed to front-to-back,
filtered to non-hidden normal windows. Falls back to
_NET_CLIENT_LIST if the WM doesn't expose stacking.
- Default keybindings (added to config.rs default key_bindings):
- Shift+Ctrl+Super+Left → command/window/toggleFrontBack
- Shift+Ctrl+Super+Right → command/app/toggleFrontBack
Mnemonic: Left = single (one window), Right = many (whole app).
`Super` = Cmd on macOS, Win on Windows, Super on Linux. Both combos
are unbound by default in all three OSes. The two existing default-
count tests in config.rs (26 → 28) are updated.
- Tests: 6 new unit tests — toggleFrontBack parsing for both scopes,
is_window_at_front pure helper (true / false at non-front /
missing-id / empty list), and the all-six-actions distinctness check.
build_command_url tests cover the new commands return None (in-process
dispatch, not HTTP-routed).
- Tray.rs dispatch is unchanged — the wildcard match on
command/window/* and command/app/* added in cycle 2 already routes
any new command through parse_zorder_command, so the toggle variants
light up automatically.
Co-Authored-By: Claude Opus 4 (1M context) <noreply@anthropic.com>
0 commit comments