Switch full screen with F11 or Alt+Enter while the title runs #1
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!1
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1/head"
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?
@TaynanGT on GitHub · 2026-11-26 08:34 UTC · original
TaynanGT:batch/full-screen-switch→main· +98 −8 · 3 files · 1 commits · merged 2026-11-26 08:35 UTCFull screen was fixed when the window was made. Now F11, or Alt+Enter, on the title's window switches between full screen (a frameless popup over the monitor the window is on) and the window it was made as, fitted to the screen. The swap chain stretches to either. DXGI's own Alt+Enter, which would switch the swap chain to exclusive full screen with buffers nothing resizes, is turned off with
MakeWindowAssociation.The README already describes the keys (How to run it).
Tested:
a_full_screen_window_is_a_frameless_popup_over_the_screen,full_screen_switches_both_ways_on_the_window_s_monitor.Not played live with this exact tree yet: the next measured session will check both keys.
@chatgpt-codex-connector[bot] on GitHub · 2026-11-26 08:35 UTC · original · edited 2026-11-26 08:38 UTC
Codex Review Summary: ✅ Completed
This comment shows the latest Codex review activity on this pull request.
3981f713981f71ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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-26 08:36 UTC · original · reviewed
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit:
3981f716f3ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
@ -170,0 +167,4 @@if full.is_some() {// A window that could go full screen: how it goes back to a window// ([`toggle_full_screen`]).*WINDOWED.lock().unwrap_or_else(|e| e.into_inner()) = Some((ex_style, style, fitted));@chatgpt-codex-connector[bot] on GitHub · 2026-11-26 08:36 UTC · original
If the title creates another unowned, non-tool top-level window after its main window, this assignment overwrites
WINDOWEDwith that other window's styles and geometry, even if it is hidden or creation subsequently fails.window_procstill restricts toggling toTITLE_WINDOW, so switching the main window back to windowed mode applies the helper's dimensions and styles to it. Save the state per HWND after successful creation, or retain only the state belonging to the selected title window.Useful? React with 👍 / 👎.
@ -172,0 +205,4 @@unsafe {wm::SetWindowLongPtrW(hwnd, wm::GWL_STYLE, style as isize);wm::SetWindowLongPtrW(hwnd, wm::GWL_EXSTYLE, ex_style as isize);wm::SetWindowPos(hwnd, std::ptr::null_mut(), x, y, w, h, wm::SWP_FRAMECHANGED | wm::SWP_NOZORDER | wm::SWP_SHOWWINDOW);@chatgpt-codex-connector[bot] on GitHub · 2026-11-26 08:36 UTC · original
For a title that passes
CW_USEDEFAULTtoCreateWindowEx,fitdeliberately preserves that sentinel, so the saved rectangle is not necessarily usable geometry. Returning from full screen later passes it directly toSetWindowPos, which does not interpretCW_USEDEFAULTas a default-placement request. Default coordinates can therefore move the window off-screen, and default dimensions can leave it incorrectly sized. Resolve the windowed rectangle to actual coordinates and positive dimensions before using it for restoration.Useful? React with 👍 / 👎.
@ -172,0 +230,4 @@const VK_RETURN: usize = 0x0D;const VK_F11: usize = 0x7A;let alt = (lparam >> 29) & 1 != 0;(message == wm::WM_KEYDOWN && wparam == VK_F11) || (message == wm::WM_SYSKEYDOWN && wparam == VK_RETURN && alt)@chatgpt-codex-connector[bot] on GitHub · 2026-11-26 08:36 UTC · original
Holding F11 or Alt+Enter beyond the keyboard repeat delay generates repeated key-down messages, and every one currently triggers another full-screen transition. The window consequently alternates modes until release, with the final mode depending on the repeat count. Check the previous-key-state bit in
lparamand toggle only on the initial key-down.Useful? React with 👍 / 👎.
@ -9305,0 +9305,4 @@// Alt+Enter is the title window's own switch to and from full// screen (frameless, the swap chain stretched); DXGI's would make// it exclusive full screen, whose buffers nothing resizes.let _ = factory.MakeWindowAssociation(hwnd, DXGI_MWA_NO_ALT_ENTER);@chatgpt-codex-connector[bot] on GitHub · 2026-11-26 08:36 UTC · original
When
presenter()finds no title-created window, it callswindow(width, height)to create the GPU fallback window. That window is created directly through Win32 inmake_window(), and itswindow_proc()only callsDefWindowProcW; it never receives the lifecycle module's new shortcut handler. Disabling DXGI's Alt+Enter unconditionally therefore removes the fallback window's existing full-screen shortcut without providing a replacement. Add the borderless toggle handler to this window too, or restrict this association change to windows with the replacement handler.Useful? React with 👍 / 👎.
@TaynanGT on GitHub · 2026-11-27 01:33 UTC · original
I opened #104 to address the four findings above. Window placement now belongs to the window that created it, the restore path resolves default coordinates before calling
SetWindowPos, and held F11 or Alt+Enter only toggles once. The fallback window keeps DXGI's Alt+Enter. The draft includes regression tests and is waiting for CI and an in-game toggle check.