Skip to content

[rcore] Set IsWindowResized() after SetWindowSize() on every backend - #6409

Open
kevin9327 wants to merge 1 commit into
raysan5:masterfrom
kevin9327:fix-setwindowsize-resized
Open

kevin9327 wants to merge 1 commit into
raysan5:masterfrom
kevin9327:fix-setwindowsize-resized

Conversation

@kevin9327

Copy link
Copy Markdown

IsWindowResized() returned true after SetWindowSize() only on the SDL backend, which posts a window-resize event. On GLFW, Win32, RGFW, and web it stayed false, even though the window size had changed.

This sets CORE.Window.resizedLastFrame in SetWindowSize() on those backends (and on SDL as well, so the flag is not delayed until the next event poll) when the requested size differs from the current one.

That matches the intended behavior from #6333: IsWindowResized() should also reflect a resize made through SetWindowSize(), and every backend should do the same thing.

Fixes #6333

IsWindowResized() was true after SetWindowSize() only on the SDL
backend, which posts a resize event. GLFW, Win32, RGFW, and the web
backend never set the flag from the call itself. Mark the window as
resized when the requested size actually changes, so all backends
agree.

Fixes raysan5#6333
@kevin9327
kevin9327 force-pushed the fix-setwindowsize-resized branch from 97c8e93 to 4b79fa2 Compare November 12, 2026 03:18
@Ne0nWinds

Copy link
Copy Markdown
Contributor

Does this actually fix the issue? CORE.Window.resizedLastFrame will get reset back to false on the next call to PollInputEvents()

@Ne0nWinds

Ne0nWinds commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Looking at the changes in this PR, if you called IsWindowResized() immediately after SetWindowSize(), it would return true, which makes sense to me. That might be considered an improvement.

However, I don't think it actually fixes the difference between SDL and the other backends.

@raysan5

raysan5 commented Nov 13, 2026

Copy link
Copy Markdown
Owner

@kevin9327 thanks for the review but I don't know if it is the right approach, I need to review it more carefully, I feel it should be set on an underlying layer, not in that function...

@raysan5 raysan5 changed the title Set IsWindowResized after SetWindowSize on every backend [rcore] Set IsWindowResized() after SetWindowSize() on every backend Nov 13, 2026
@raysan5 raysan5 added the windowing Issues about the window system label Nov 16, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

windowing Issues about the window system

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[rcore] IsWindowResized() returns false after calling SetWindowSize()

3 participants