Repository navigation
Conversation
Contributor
Author
|
CI failed inside winit-x11, which should not be related to this PR's change. |
kchibisov
approved these changes
Jun 14, 2026
Contributor
Author
|
I will rebase onto the latest master branch and try to resolve the conflict within today. |
Contributor
Author
|
I rebased this branch onto the latest master branch resolving the conflict. |
1 task done
echelon
added a commit
to storytold/pdfcraft
that referenced
this pull request
Oct 10, 2026
…it#4587) (#674) eframe creates PdfCraft's window hidden, restores the saved state (app.ron, persist_window) and shows the window after the first frame is drawn. For a window closed maximized, winit 0.30.13 applies the maximized state with ShowWindow(SW_MAXIMIZE), which shows a hidden window: PdfCraft appeared unpainted (white), was hidden again, then shown with SW_SHOW and SW_MAXIMIZE once more. rust-windowing/winit#4586 also shows the window's focus state going wrong on this path. vendor/winit now skips the maximize while the window is hidden and shows a hidden window that is maximized with one SW_MAXIMIZE, as rust-windowing/winit#4587 (approved upstream) does on winit master. That is the later, focus-safe form of #4575; #4575's other change (re-sending SW_MINIMIZE on every flag change while minimized) is not taken. Transitions between two visible states make the same ShowWindow calls as before. A test fails if a re-vendored winit loses the patch. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Brandon Thomas <echelon@gmail.com>
krichelj
pushed a commit
to krichelj/pdfcraft
that referenced
this pull request
Oct 11, 2026
…it#4587) (storytold#674) eframe creates PdfCraft's window hidden, restores the saved state (app.ron, persist_window) and shows the window after the first frame is drawn. For a window closed maximized, winit 0.30.13 applies the maximized state with ShowWindow(SW_MAXIMIZE), which shows a hidden window: PdfCraft appeared unpainted (white), was hidden again, then shown with SW_SHOW and SW_MAXIMIZE once more. rust-windowing/winit#4586 also shows the window's focus state going wrong on this path. vendor/winit now skips the maximize while the window is hidden and shows a hidden window that is maximized with one SW_MAXIMIZE, as rust-windowing/winit#4587 (approved upstream) does on winit master. That is the later, focus-safe form of storytold#4575; storytold#4575's other change (re-sending SW_MINIMIZE on every flag change while minimized) is not taken. Transitions between two visible states make the same ShowWindow calls as before. A test fails if a re-vendored winit loses the patch. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Brandon Thomas <echelon@gmail.com>
This was referenced Oct 12, 2026
lucasmerlin
added a commit
to emilk/egui
that referenced
this pull request
Oct 13, 2026
eframe now remembers the window's last *normal* (not maximized, not fullscreen) size and position. After a relaunch, un-maximizing or leaving fullscreen goes back to that size instead of a window that is "maximized but not maximized". Other fixes: * A maximized or fullscreen window no longer paints its first frame small. * Leaving a restored fullscreen goes straight back to the normal size, in one step. * The window reopens on the correct monitor, also with monitors of different scale factors on macOS. The position is saved in pixels together with the scale factor, and converted on restore. * On macOS and Windows, the window is placed exactly after creation, then maximized or made fullscreen. * On Windows, a window restored maximized no longer flashes on screen (shown, hidden, then shown again) during startup. winit maximizes with `ShowWindow(SW_MAXIMIZE)`, which shows the still-hidden window before hiding it again. The new `egui_winit::set_maximized` cloaks a hidden window (`DWMWA_CLOAK`) while maximizing it, so it stays invisible but is already maximized for the first frame. This is a workaround until winit has rust-windowing/winit#4575 or rust-windowing/winit#4587. * On X11, a window saved maximized or fullscreen now restores as such. winit sends these as `_NET_WM_STATE` client messages, which window managers ignore while the window is still hidden (eframe keeps it hidden until the first frame is painted). The new `WindowSettings::after_first_show` re-applies them right after the window is shown. `before_first_show` replaces the macOS-only `enter_fullscreen_after_first_frame` / `enter_deferred_fullscreen`. The save format changed, so old saved window settings are ignored once (the window opens at its default size). Known limitations: * The normal geometry is sampled on save. If you resize, maximize before the next autosave, and quit while maximized, un-maximizing after a relaunch goes back to the size from before the resize. * On X11, a restored maximized window may show un-maximized for a frame before it maximizes. * On X11 with GNOME (mutter), un-maximizing a window that was restored maximized puts it in the top-left corner of its monitor, not at its saved position. The size is right. mutter places windows that get maximized right after mapping at the work area origin. * On Wayland, the position (and so the monitor) can't be restored, because Wayland doesn't let clients read or set window positions. Size and maximized/fullscreen state are restored. * On GNOME, a restored window that is close to the screen size gets auto-maximized by mutter (`org.gnome.mutter auto-maximize`). Tested on macOS, wayland, x11 (XWayland on GNOME, including two monitors) and Windows (wgpu and glow). * [x] I have followed the instructions in the PR template 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_019yMtdim1FPCsviY1FWfdTk --------- Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
richerfu
pushed a commit
to richerfu/winit
that referenced
this pull request
Nov 2, 2026
Port of rust-windowing#4587 (focus-safe form of rust-windowing#4575). Originally "M15.1: keep hidden maximized windows hidden" in storytold/wordcraft#787 (same change as storytold/pdfcraft vendor/winit).
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
changelogmodule if knowledge of this change could be valuable to usersFixes #4586
Previously winit could call
ShowWindow(SW_MAXIMIZE)while the window was still hidden. It could disturb Win32’s focus state. The fix delays the call until the window is actually shown avoiding calling it twice.