at-terminal --behind opens the window behind the others, leaving the foreground (AHT-231) #60

Merged
nelson merged 1 commit from aht-231-swap-behind into main 2026-11-29 18:37:16 -08:00
Owner

Work package: AHT-231

Nelson, on the treadmill PC: an update kept bringing at-terminal up over his screen. at-update's swap ends the open at-terminal and has the at server start the new release, and the new window always took the foreground and the top of the z-order, even when he was in another app.

Added

  • at-terminal --behind (Windows): the first window is created inactive (with_active(false), so its first ShowWindow is SW_SHOWNOACTIVATE), and at start, while it is still cloaked, open_behind puts it under every other window (SetWindowPos(HWND_BOTTOM, SWP_NOACTIVATE)). The foreground stays where it is and nothing on any monitor is covered. It is an ordinary window afterwards: taskbar, Alt+Tab and a summon bring it forward.
  • A unit test that --behind parses as a plain flag; a README line.

Changed

  • A launch with --behind skips come_forward_on_launch (the SetForegroundWindow / attach-input path that pulled it to the front, HOMECFG-94).
  • rio-window: a fullscreen window made inactive no longer runs force_window_active (its SendInput Alt + SetForegroundWindow) at creation. An active one still does.

Left alone

  • Every launch without the flag (the Win key, logon, a swap while he was in at-terminal) comes forward exactly as before (AHT-210).
  • A --behind launch that finds at-terminal running summons it like any launch.

Not done here: at-update passing the flag; that is its own PR, merged after this release is out, since an older at-terminal rejects the unknown flag.

🤖 Generated with Claude Code

Work package: [AHT-231](https://openproject.home.romaine.life/wp/AHT-231) Nelson, on the treadmill PC: an update kept bringing at-terminal up over his screen. at-update's swap ends the open at-terminal and has the at server start the new release, and the new window always took the foreground and the top of the z-order, even when he was in another app. **Added** - `at-terminal --behind` (Windows): the first window is created inactive (`with_active(false)`, so its first `ShowWindow` is `SW_SHOWNOACTIVATE`), and at start, while it is still cloaked, `open_behind` puts it under every other window (`SetWindowPos(HWND_BOTTOM, SWP_NOACTIVATE)`). The foreground stays where it is and nothing on any monitor is covered. It is an ordinary window afterwards: taskbar, Alt+Tab and a summon bring it forward. - A unit test that `--behind` parses as a plain flag; a README line. **Changed** - A launch with `--behind` skips `come_forward_on_launch` (the `SetForegroundWindow` / attach-input path that pulled it to the front, HOMECFG-94). - rio-window: a fullscreen window made inactive no longer runs `force_window_active` (its `SendInput` Alt + `SetForegroundWindow`) at creation. An active one still does. **Left alone** - Every launch without the flag (the Win key, logon, a swap while he was in at-terminal) comes forward exactly as before (AHT-210). - A `--behind` launch that finds at-terminal running summons it like any launch. **Not done here**: at-update passing the flag; that is its own PR, merged after this release is out, since an older at-terminal rejects the unknown flag. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
at-terminal --behind opens the window behind the others, leaving the foreground (AHT-231)
Some checks failed
Suite default / reused-checks (pull_request) Has been cancelled
Suite rust / check-format (pull_request) Has been cancelled
Suite rust / check-test-linux (pull_request) Has been cancelled
Suite release / deliver-prune (pull_request) Has been skipped
Suite default / scope (pull_request) Successful in 10s
Suite release / scope (pull_request) Successful in 10s
Suite release / publish (pull_request) Has been skipped
Suite rust / scope (pull_request) Successful in 10s
Suite rust / check-typos (pull_request) Has been skipped
Suite release / module (pull_request) Has been skipped
Suite release / finalize (pull_request) Has been skipped
Suite default / check-fetches (pull_request) Has been skipped
Suite default / check-rules (pull_request) Has been skipped
Suite rust / check-services (pull_request) Has been skipped
Suite rust / check-machete (pull_request) Has been skipped
Suite rust / check-audit (pull_request) Has been skipped
Suite release / reserve (pull_request) Has been skipped
Suite release / check-build (rust, x86_64-pc-windows-msvc) (, rust-x86_64-pc-windows-msvc, x86_64-pc-windows-msvc, false, windows-latest, x86_64-pc-windows-msvc, rust) (pull_request) Has been skipped
Suite release / check-package (pull_request) Has been skipped
Suite release / build (rust, x86_64-pc-windows-msvc) (, rust-x86_64-pc-windows-msvc, x86_64-pc-windows-msvc, false, windows-latest, x86_64-pc-windows-msvc, rust) (pull_request) Has been skipped
Suite release / deliver (pull_request) Has been skipped
Suite release / deploy-image (pull_request) Has been skipped
Suite release / reused-checks (pull_request) Successful in 9s
Suite default / check-logs (pull_request) Successful in 9s
Suite rust / check-test-windows (pull_request) Has been cancelled
Suite rust / reused-checks (pull_request) Has been cancelled
merge-queue not in the queue
b69aff8cb0
nelson merged commit e8636bee53 into main 2026-11-29 18:37:16 -08:00
nelson deleted branch aht-231-swap-behind 2026-11-29 18:37:17 -08:00
Sign in to join this conversation.
No reviewers
No labels
queue
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
romaine-life/at-terminal!60
No description provided.