Conversation
eXpl0it3r
force-pushed
the
bugfix/win32-render-while-resizing
branch
4 times, most recently
from
September 12, 2026 09:11
a4f856b to
7dabdba
Compare
Using Fibers (instead of threads) the otherwise blocking modal loop can be paused and control can be returned to the main loop fiber.
eXpl0it3r
force-pushed
the
bugfix/win32-render-while-resizing
branch
from
September 12, 2026 09:16
7dabdba to
cfdb9d6
Compare
Member
Author
Member
Author
|
Any of the contributors / commenters on previous discussions and PRs, can you take a look at / test this PR, @hobby8, @1aam2am1, @eliasdaler, @learn-more, @trustytrojan, @JonnyPtn, @MarioLiebisch, @MirrasHue, @antcode123? |
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.

Description
This is another proposal in fixing the long standing "unable to render while resizing or dragging the window" issue on Windows. See also the solution design for it: https://github.com/SFML/SFML/wiki/SD:-Render-while-Resizing
Other proposals:
Quick recap on the problem: While resizing, clicking the title bar / moving the window, the event dispatching goes into Windows own event loop (i.e. the modal loop) and doesn't return control to the caller, which means SFML applications pause on
pollEvents().This PR essentially uses the "threading method", but instead of threads it uses Fibers. Fibers are separate call stacks on the same thread, which allows SFML to pause the modal loop and return control to the main loop and its own fiber.
The second commit fixes the issue, where clicking on the title bar also blocks on the modal loop and right clicking blocks until the mouse button is released.
This PR fixes #3016
See also:
Tasks
How to test this PR?
Resize the window, drag it, right click on the title bar, click & hold on the title bar.
This PR
1601 PR
3390 PR
JonnyPtn's commit