Preserve window placement across full-screen switches #104

Merged
TaynanGT merged 1 commit from upstream-pr/104 into main 2026-11-27 01:44:49 +00:00
TaynanGT commented 2026-11-27 01:32:48 +00:00 (Migrated from github.com)

Imported from TaynanGT/Vice-Tay. Originally posted by TaynanGT on 2026-11-27T01:32:48Z.


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

<!-- greyfinch-sync:TaynanGT/Vice-Tay:issue:5519628430 --> Imported from [TaynanGT/Vice-Tay](https://github.com/TaynanGT/Vice-Tay/pull/104). Originally posted by [TaynanGT](https://github.com/TaynanGT) on 2026-11-27T01:32:48Z. --- 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)
chatgpt-codex-connector[bot] commented 2026-11-27 01:44:58 +00:00 (Migrated from github.com)

Imported from TaynanGT/Vice-Tay. Originally posted by chatgpt-codex-connector[bot] on 2026-11-27T01:44:58Z.


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.

<!-- greyfinch-sync:TaynanGT/Vice-Tay:comment:7207545315 --> Imported from [TaynanGT/Vice-Tay](https://github.com/TaynanGT/Vice-Tay/pull/104#issuecomment-7207545315). Originally posted by [chatgpt-codex-connector[bot]](https://github.com/apps/chatgpt-codex-connector) on 2026-11-27T01:44:58Z. --- <!-- 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>
Sign in to join this conversation.
No reviewers
No labels
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.

Reference
TaynanGT/Vice-Tay!104
No description provided.