[bug][startup] Alt+Enter after the start's borderless full screen hides the window (white area, gone from the taskbar); the game keeps running #136

Closed
opened 2026-12-03 22:40:21 +00:00 by Jesper-A · 3 comments
Collaborator

What happened

The game started in borderless full screen (Darner's own DARNER_FULLSCREEN mode; the log says borderless fullscreen applied screen=(2560, 1440)). The F1 menu was closed. I pressed Alt+Enter to go back to a window.

What I saw: the window turned white and then disappeared from the taskbar. The game did not stop: audio kept playing and the process kept answering.

What I read from the window without touching it:

  • window style 0x04CF0000 (WS_OVERLAPPEDWINDOW | WS_CLIPSIBLINGS), without WS_VISIBLE
  • its rectangle was 43,0,2464,1392 (the windowed size)
  • IsWindowVisible returned false, the process was responding, frames kept being presented
  • no swap-chain or device errors in the log

One ShowWindow(hwnd, SW_SHOW) from outside brought the window back normally. I did this once; it did not repeat.

GPU and driver

NVIDIA GeForce RTX 2070 SUPER 8 GB (Turing), driver 621.40, Resizable BAR off. This looks like window code, not GPU code.

CPU, RAM and Windows version

AMD Ryzen 7 5800X, 32 GB, Windows 11 Pro Insider Preview build 26320.

Darner release or commit

Release build of trustno1/main 40ed13b91 with upstream PR #76 and our own local commits merged; none of them touches lifecycle.rs (empty git diff), and lifecycle.rs is identical on main 57dea7f23.

Spec dependence: likely general (plain user32 window code); untested on other GPUs and Windows builds.

Settings

Series S, DLSS Performance. DARNER_FULLSCREEN on (borderless at start). No other window switches that I know of.

Logs

The play log from that run (about 8 MB, still growing) is not attached; I can attach it on request. Relevant: borderless fullscreen applied screen=(2560, 1440) at 22:28:12Z, and the present-budget lines kept coming with failed=0 after the Alt+Enter.

Likely cause (read from code, not yet confirmed by a test)

In crates/darner-hle/src/modules/lifecycle.rs:

  • hook() (~line 787) runs right after the window is created and calls fullscreen() (~803, defined ~306), which calls enter_borderless() (~368).
  • That function saves the window's current style (GetWindowLongW(GWL_STYLE), ~371) for Alt+Enter to go back to. At that moment the title has not shown the window yet, so the saved style has no WS_VISIBLE. (I infer the timing from the style we read; I did not trace the title's own ShowWindow call.)
  • toggle_fullscreen() (~389) later restores it with SetWindowLongW(GWL_STYLE, saved.style) (~402). That clears WS_VISIBLE on the now-visible window, so Windows hides it.

Not checked: whether a window started with DARNER_FULLSCREEN off, then toggled with Alt+Enter, behaves correctly (it should, as the saved style would then include WS_VISIBLE). Other GPUs and Windows builds were not tried; the code is not GPU specific.

Workaround until it is fixed

Do not press Alt+Enter after a borderless start. If the window is already hidden, it can be shown again from outside (for example ShowWindow with SW_SHOW). The F1 menu has a row FULLSCREEN (NO BORDER) (crates/darner-gpu/src/host/menu.rs:542), but it only applies at the next start, and I have not tested whether starting with it off avoids the problem.

Are you working on a fix?

Yes (Jesper-A), on branch up-altenter-visible. Plan: when restoring, keep the window's current WS_VISIBLE bit instead of the saved one, with a unit test on the style calculation. A small PR will follow and will reference this issue.

Not checked

Other GPUs and makers, other Windows builds, Linux/Proton, a second Alt+Enter after the window is shown again, and the DARNER_FULLSCREEN_BARS backdrop path.

Drafted with AI assistance (Claude Code).

### What happened The game started in borderless full screen (Darner's own `DARNER_FULLSCREEN` mode; the log says `borderless fullscreen applied screen=(2560, 1440)`). The F1 menu was closed. I pressed Alt+Enter to go back to a window. What I saw: the window turned white and then disappeared from the taskbar. The game did not stop: audio kept playing and the process kept answering. What I read from the window without touching it: - window style `0x04CF0000` (`WS_OVERLAPPEDWINDOW | WS_CLIPSIBLINGS`), **without** `WS_VISIBLE` - its rectangle was 43,0,2464,1392 (the windowed size) - `IsWindowVisible` returned false, the process was responding, frames kept being presented - no swap-chain or device errors in the log One `ShowWindow(hwnd, SW_SHOW)` from outside brought the window back normally. I did this once; it did not repeat. ### GPU and driver NVIDIA GeForce RTX 2070 SUPER 8 GB (Turing), driver 621.40, Resizable BAR off. This looks like window code, not GPU code. ### CPU, RAM and Windows version AMD Ryzen 7 5800X, 32 GB, Windows 11 Pro Insider Preview build 26320. ### Darner release or commit Release build of `trustno1/main` 40ed13b91 with upstream PR #76 and our own local commits merged; none of them touches `lifecycle.rs` (empty git diff), and `lifecycle.rs` is identical on main 57dea7f23. Spec dependence: likely general (plain user32 window code); untested on other GPUs and Windows builds. ### Settings Series S, DLSS Performance. `DARNER_FULLSCREEN` on (borderless at start). No other window switches that I know of. ### Logs The play log from that run (about 8 MB, still growing) is not attached; I can attach it on request. Relevant: `borderless fullscreen applied screen=(2560, 1440)` at 22:28:12Z, and the present-budget lines kept coming with failed=0 after the Alt+Enter. ### Likely cause (read from code, not yet confirmed by a test) In `crates/darner-hle/src/modules/lifecycle.rs`: - `hook()` (~line 787) runs right after the window is created and calls `fullscreen()` (~803, defined ~306), which calls `enter_borderless()` (~368). - That function saves the window's current style (`GetWindowLongW(GWL_STYLE)`, ~371) for Alt+Enter to go back to. At that moment the title has not shown the window yet, so the saved style has no `WS_VISIBLE`. (I infer the timing from the style we read; I did not trace the title's own `ShowWindow` call.) - `toggle_fullscreen()` (~389) later restores it with `SetWindowLongW(GWL_STYLE, saved.style)` (~402). That clears `WS_VISIBLE` on the now-visible window, so Windows hides it. Not checked: whether a window started with `DARNER_FULLSCREEN` off, then toggled with Alt+Enter, behaves correctly (it should, as the saved style would then include `WS_VISIBLE`). Other GPUs and Windows builds were not tried; the code is not GPU specific. ### Workaround until it is fixed Do not press Alt+Enter after a borderless start. If the window is already hidden, it can be shown again from outside (for example `ShowWindow` with `SW_SHOW`). The F1 menu has a row `FULLSCREEN (NO BORDER)` (`crates/darner-gpu/src/host/menu.rs:542`), but it only applies at the next start, and I have not tested whether starting with it off avoids the problem. ### Are you working on a fix? Yes (Jesper-A), on branch `up-altenter-visible`. Plan: when restoring, keep the window's current `WS_VISIBLE` bit instead of the saved one, with a unit test on the style calculation. A small PR will follow and will reference this issue. ### Not checked Other GPUs and makers, other Windows builds, Linux/Proton, a second Alt+Enter after the window is shown again, and the `DARNER_FULLSCREEN_BARS` backdrop path. Drafted with AI assistance (Claude Code).

Reproduced on another PC and Windows build with the v2026.12.03.01 release exe: the same symptom and the same window style as in the report. Also checked one case the report left open: a second Alt+Enter doesn't bring the window back.

PC: RTX 4080 16 GB (driver 32.0.16.1742), Ryzen 9 7900, 32 GB, Windows 11 Home 26200 (not Insider). Build: v2026.12.03.01 release darner.exe. Settings: Series X, 4K output, DLSS Performance, frame generation 2x, ray tracing off, borderless at start (borderless fullscreen applied screen=(3840, 2160) content=(3840, 2160) placed=(0, 0, 3840, 2160) stretch=false).

Steps: first start after the shader preload. At the account picker, with F1 closed, I pressed Alt+Enter once, then once more, then called ShowWindow(hwnd, SW_SHOW) from outside. After each step I read the window with GetWindowLongW(GWL_STYLE) and IsWindowVisible (rectangles in 150 % scaled coordinates):

style visible rectangle on screen
before 0x94000000 true 0,0,2560,1440 the game
1st Alt+Enter 0x04CF0000 false 43,0,2466,1392 a white window with a title bar
2nd Alt+Enter 0x84000000 false 0,0,2560,1440 a white area over the whole screen
ShowWindow(SW_SHOW) 0x94000000 true 0,0,2560,1440 the game again

The game kept running throughout: the window title kept updating its fps, and in the meantime the game moved on from the account picker into the opening cutscene. The log has no ERROR lines and no swap-chain or device warnings, and the present-budget lines show failed=0.

So once the window is hidden, the keyboard alone can't get it back: the second Alt+Enter goes back to borderless, but enter_borderless builds its style from the current, hidden one.

I tested #141 on the same PC; the results are there.

Reproduced on another PC and Windows build with the v2026.12.03.01 release exe: the same symptom and the same window style as in the report. Also checked one case the report left open: a second Alt+Enter doesn't bring the window back. **PC:** RTX 4080 16 GB (driver 32.0.16.1742), Ryzen 9 7900, 32 GB, Windows 11 Home 26200 (not Insider). **Build:** v2026.12.03.01 release `darner.exe`. **Settings:** Series X, 4K output, DLSS Performance, frame generation 2x, ray tracing off, borderless at start (`borderless fullscreen applied screen=(3840, 2160) content=(3840, 2160) placed=(0, 0, 3840, 2160) stretch=false`). **Steps:** first start after the shader preload. At the account picker, with F1 closed, I pressed Alt+Enter once, then once more, then called `ShowWindow(hwnd, SW_SHOW)` from outside. After each step I read the window with `GetWindowLongW(GWL_STYLE)` and `IsWindowVisible` (rectangles in 150 % scaled coordinates): | | style | visible | rectangle | on screen | |---|---|---|---|---| | before | `0x94000000` | true | 0,0,2560,1440 | the game | | 1st Alt+Enter | `0x04CF0000` | false | 43,0,2466,1392 | a white window with a title bar | | 2nd Alt+Enter | `0x84000000` | false | 0,0,2560,1440 | a white area over the whole screen | | `ShowWindow(SW_SHOW)` | `0x94000000` | true | 0,0,2560,1440 | the game again | The game kept running throughout: the window title kept updating its fps, and in the meantime the game moved on from the account picker into the opening cutscene. The log has no ERROR lines and no swap-chain or device warnings, and the present-budget lines show `failed=0`. So once the window is hidden, the keyboard alone can't get it back: the second Alt+Enter goes back to borderless, but `enter_borderless` builds its style from the current, hidden one. I tested #141 on the same PC; the results are there.
Author
Collaborator

Fixed on main by a917f992f ("lifecycle: Alt+Enter out of borderless keeps the window shown (#136)"); closing. The repro on v2026.12.03.01 was from before that commit. If it still happens on a build that includes a917f992f, please reopen with the log. Trillazill confirmed the same change on the #141 branch.

Drafted with AI assistance (Claude Code).

Fixed on main by a917f992f ("lifecycle: Alt+Enter out of borderless keeps the window shown (#136)"); closing. The repro on v2026.12.03.01 was from before that commit. If it still happens on a build that includes a917f992f, please reopen with the log. Trillazill confirmed the same change on the #141 branch. Drafted with AI assistance (Claude Code).

Reproduced on Windows 11 (build 26300), RTX 5080, build v2026.12.03.01-22: with FULLSCREEN (NO BORDER) on, Alt+Enter turns the window white and removes it from the taskbar. The process keeps running with no main window (MainWindowHandle 0), and pressing Alt+Enter again does not bring it back.

Drafted with AI assistance (OpenCode).

Reproduced on Windows 11 (build 26300), RTX 5080, build v2026.12.03.01-22: with FULLSCREEN (NO BORDER) on, Alt+Enter turns the window white and removes it from the taskbar. The process keeps running with no main window (MainWindowHandle 0), and pressing Alt+Enter again does not bring it back. Drafted with AI assistance (OpenCode).
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
3 participants
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
TrustNo1/Darner#136
No description provided.