Preserve window placement across full-screen switches #104

Manually merged
github merged 1 commit from gh-pr/104/head into gh-pr/104/base 2026-11-27 02:11:00 +00:00
Owner

@⁠TaynanGT on GitHub · 2026-11-27 01:32 UTC · original
TaynanGT:fix/fullscreen-window-restore → main · +88 −35 · 2 files · 1 commits · merged 2026-11-27 01:44 UTC

Follows up on the four review findings in #1.

  • Track windowed placement and full-screen state by HWND, after successful creation. Remove that state when the window is destroyed.
  • Read the actual rectangle before entering full screen. A window started in full screen can have unresolved CW_USEDEFAULT coordinates, so restore a usable rectangle on its monitor's work area in that case.
  • Toggle only on the initial F11 or Alt+Enter key-down. Leave DXGI's Alt+Enter available on its fallback window.

Regression tests cover held keys and a default rectangle on a monitor with a negative origin. CI passed after retrying a write-watch test. All 14 local lifecycle tests passed. The Series S title on the RTX 4090 started in borderless 3840 × 2160. F11 and Alt+Enter both restored the same 2880 × 1620 window at (480, 234) and returned to full screen. Win32 window placement

**@⁠TaynanGT** on GitHub · 2026-11-27 01:32 UTC · [original](https://github.com/TaynanGT/Vice-Tay/pull/104) `TaynanGT:fix/fullscreen-window-restore` → `main` · +88 −35 · 2 files · 1 commits · merged 2026-11-27 01:44 UTC Follows up on the four review findings in #1. - Track windowed placement and full-screen state by HWND, after successful creation. Remove that state when the window is destroyed. - Read the actual rectangle before entering full screen. A window started in full screen can have unresolved `CW_USEDEFAULT` coordinates, so restore a usable rectangle on its monitor's work area in that case. - Toggle only on the initial F11 or Alt+Enter key-down. Leave DXGI's Alt+Enter available on its fallback window. Regression tests cover held keys and a default rectangle on a monitor with a negative origin. [CI passed](https://github.com/TaynanGT/Vice-Tay/actions/runs/45923172490) after retrying a write-watch test. All 14 local lifecycle tests passed. The Series S title on the RTX 4090 started in borderless 3840 × 2160. F11 and Alt+Enter both restored the same 2880 × 1620 window at (480, 234) and returned to full screen. [Win32 window placement](https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-createwindowexw)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 02:10:58 +00:00
github manually merged commit 103599cef4 into gh-pr/104/base 2026-11-27 02:11:00 +00:00
Author
Owner

@⁠chatgpt-codex-connector[bot] on GitHub · 2026-11-27 01:44 UTC · original · edited 2026-11-27 01:46 UTC

Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-27T01:45:47.270590Z 103599c Draft marked ready
🔒 Security Review ✅ Completed 2026-11-27T01:46:16.302116Z 103599c Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@⁠codex review" or "@⁠codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

**@⁠chatgpt-codex-connector[bot]** on GitHub · 2026-11-27 01:44 UTC · [original](https://github.com/TaynanGT/Vice-Tay/pull/104#issuecomment-7207545315) · edited 2026-11-27 01:46 UTC <!-- codex-pull-request-review-summary --> <!-- codex-review-state:v1 {"code_review":{"commit_sha":"103599cef4863d6e59b88470ee996faf4aeff48f","has_any_findings":false,"has_unresolved_findings":false,"status":"completed"},"security_review":{"commit_sha":"103599cef4863d6e59b88470ee996faf4aeff48f","has_any_findings":null,"has_unresolved_findings":null,"status":"completed"}} --> <!-- codex-security-review:v1 {"blockingSeverityThreshold":"P0","headSha":"103599cef4863d6e59b88470ee996faf4aeff48f","mergeGateEnabled":false,"pullRequestNumber":104,"repository":"TaynanGT/Vice-Tay","status":"completed"} --> <details> <summary><strong>Codex Review Summary</strong>: ✅ Completed</summary> This comment shows the latest Codex review activity on this pull request. | Review | Status | Commit | Review trigger | | --- | --- | --- | --- | | 📝 **Code Review** | ✅ **Completed** <relative-time datetime="2026-11-27T01:45:47.270590Z">2026-11-27T01:45:47.270590Z</relative-time> | `103599c` | Draft marked ready | | 🔒 **Security Review** | ✅ **Completed** <relative-time datetime="2026-11-27T01:46:16.302116Z">2026-11-27T01:46:16.302116Z</relative-time> | `103599c` | Draft marked ready | <details> <summary>ℹ️ About Codex in GitHub</summary> <br/> [Your team has set up Codex to review pull requests in this repo](https://chatgpt.com/codex/cloud/settings/general). Reviews are triggered when you - Open a pull request for review - Mark a draft as ready - Comment "@⁠codex review" or "@⁠codex security review". Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. </details> </details>
This discussion has been locked. Commenting is limited to contributors.
No description provided.