Skip to content

Fix IsWindowResized() after programmatic window resize - #6458

Closed
Sakibpedia wants to merge 1 commit into
raysan5:masterfrom
Sakibpedia:fix-iswindowresized-setwindowsize
Closed

Sakibpedia wants to merge 1 commit into
raysan5:masterfrom
Sakibpedia:fix-iswindowresized-setwindowsize

Conversation

@Sakibpedia

@Sakibpedia Sakibpedia commented Nov 29, 2026 •

Copy link
Copy Markdown

Fixes #6333.

IsWindowResized() is reset by PollInputEvents() on every backend. When the resize comes from SetWindowSize(), some backends update the framebuffer size before that reset, so the flag is cleared and the resize is never reported.

This change records the framebuffer size at the end of each frame in rcore.c and sets resizedLastFrame when it changes, so programmatic resizes are reported for one frame just like mouse-driven resizes on all backends. Added examples/core/core_window_resize.c as a regression example.

Verified on Windows with the GLFW backend: raylib builds, the example compiles, and IsWindowResized() is true for exactly one frame after SetWindowSize() (it was false with the original code).

@raysan5

raysan5 commented Nov 29, 2026

Copy link
Copy Markdown
Owner

this appriach is not aligned

@raysan5 raysan5 closed this Nov 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

2 participants