VICTORY_MONITOR: the window, or full screen, on a chosen monitor #125
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/TaynanGT--Vice-Tay!125
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-125"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@Geckomacabre on GitHub · 2026-11-27 03:09 UTC · original
Geckomacabre:pr/monitor→main· +166 −7 · 2 files · 2 commits · closed without mergingVICTORY_MONITORpicks the monitor by device name (DISPLAY3,\.\DISPLAY3) or by its 1-based place in Windows' list.VICTORY_FULLSCREEN=1the full-screen popup covers that monitor instead of the primary one. The per-window restore state (#104) and F11 / Alt+Enter are unchanged.title window put on the monitor VICTORY_MONITOR names/title window made full screen ... left= top=. Test:pick_monitor.Tested: used every session on a two-monitor PC (RTX 4090) on a sibling tree; resolved here onto the per-window restore state from #104.
Checks:
cargo check -p victory --features diagnostics --testspasses on this branch. Unit tests (victory-hlelifecycle) are pending; results will follow as a comment.🤖 Generated with Claude Code
@TaynanGT on GitHub · 2026-11-27 03:13 UTC · original
Thanks for bringing the monitor selector over. I checked the startup path against #104. F11 and Alt+Enter still use the monitor under the current window, so moving the window before toggling works the same way.
I’d fix two cases before merging.
fitonly checks for a null parent. An unownedWS_EX_TOOLWINDOWcan be moved to the selected display, and a zero-sized helper can become as large as the work area. The full-screen path already excludes tool windows and child windows. Please share that eligibility check and look up the selected monitor once inplace, so both startup rectangles use the same display.fit_with_limitpasses throughCW_USEDEFAULT. The fallback then uses the whole work area and bypassesVICTORY_WINDOW_MAX. This also changes the rectangle restored on the first exit from full screen. Please resolve a default windowed size on the selected monitor before applying the cap. A test with a negative monitor origin,CW_USEDEFAULT, and a1280x720cap would cover windowed startup and the first restore.All 15 lifecycle tests passed locally on
3207b8a. Please add a short example todocs/this-fork.md(-More @{VICTORY_MONITOR='DISPLAY3'}) and mention that numbers use enumeration order. The separate DXGI fallback window still uses its own placement.@Geckomacabre on GitHub · 2026-11-27 03:34 UTC · original
Test results for this branch (Windows 11, RTX 4090, toolchain 1.98.1,
--test-threads=1):cargo check -p victory --features diagnostics --tests: clean.cargo test -p victory-hle -- --test-threads=1 lifecycle: 15 passed, 0 failed, including the newa_monitor_is_picked_by_name_or_placeand the existingfull_screen_switches_both_ways_on_the_window_s_monitoranda_full_screen_window_is_a_frameless_popup_over_the_screen.🤖 Generated with Claude Code
@TaynanGT on GitHub · 2026-11-27 04:01 UTC · original
Thanks for running the lifecycle checks, @Geckomacabre. I approved CI for
3207b8a, and the full Windows workflow passed. The remaining review cases are the exclusion of tool windows and theCW_USEDEFAULTpath withVICTORY_WINDOW_MAX. A secondary monitor with a negative origin would cover the startup and full-screen restore cases in one test. CI run@Geckomacabre on GitHub · 2026-11-27 04:07 UTC · original
Thanks for the review. Pushed
eaa7578:placeable()(no owner or parent, not a child, not a tool window) now decides both full screen and moving a window to the chosen monitor, so an unownedWS_EX_TOOLWINDOWstays where Windows puts it.place()looks the monitor up once and hands its work area tofit(); the windowed and full-screen rectangles use the same display.CW_USEDEFAULT:on_monitor()first resolves a size left to Windows to three quarters of the chosen work area (asrestore_rectdoes), then fits it to the area andVICTORY_WINDOW_MAX, centred. A zero-sized helper keeps what it asked for. The windowed rectangle is what the first exit from full screen restores.a_default_sized_window_on_the_chosen_monitor_is_resolved_then_capped(negative monitor origin,CW_USEDEFAULT, 1280x720 cap, plus the first restore throughtoggled) andtool_child_and_owned_windows_are_not_placed.docs/this-fork.mdhas the-More @{VICTORY_MONITOR='DISPLAY3'}example, notes that numbers follow the enumeration order, and that the DXGI fallback window keeps its own placement.Status:
cargo checkand the lifecycle tests of this revision are not run yet; I'll post the results after the next build window.🤖 Generated with Claude Code
@Geckomacabre on GitHub · 2026-11-27 04:13 UTC · original
Results for
eaa7578(Windows 11, RTX 4090, toolchain 1.98.1,--test-threads=1):cargo check -p victory --features diagnostics --tests: clean, no warnings.cargo test -p victory-hle -- --test-threads=1 lifecycle: 17 passed, 0 failed, including the newa_default_sized_window_on_the_chosen_monitor_is_resolved_then_cappedandtool_child_and_owned_windows_are_not_placed.🤖 Generated with Claude Code
@TaynanGT on GitHub · 2026-11-27 04:21 UTC · original
Thanks for updating the monitor selector and rerunning the lifecycle tests, @Geckomacabre. Your change is on
mainthrough #148 with your authorship. The 17 lifecycle tests and Windows CI passed. The final revision keeps auxiliary windows in their original geometry and checks the capped default rectangle and fullscreen restore on a monitor with a negative origin.Pull request closed