You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reported in version: HG 2.0 Reported for operating system, platform: All, All
Comments on the original bug report:
On 2018-08-13 17:31:45 +0000, Ethan Lee wrote:
Created attachment 3280
Patch to fix loose RESIZED events on SIZE_CHANGED
At the bottom of this post is a test program that demonstrates what's happening, at least on Windows 10.
I'm finding that Windows REALLY likes to dump lots of resize events when toggling fullscreen; in particular it sends a resize event as it's resizing the window, before SDL is finished changing the window size. The result is this:
On Windows you can actually get a good sense of the problem simply by toggling fullscreen a bunch, no clever setup needed. The way I fixed this is by making it so any SIZE_CHANGED event clears out all of the size events, so whatever the latest size event is the only one in the loop. User resizes will still always get exactly 1 SIZE_CHANGED and 1 RESIZED, but programmatic changes will always get exactly 1 SIZE_CHANGED and 0 RESIZED if they end up overriding any resizes between frames.
#include <SDL.h>
int main(int argc, char **argv)
{
SDL_DisplayMode mode;
SDL_Window *window;
SDL_Event evt;
SDL_bool ftoggle = SDL_FALSE;
Uint8 run = 1;
This bug report was migrated from our old Bugzilla tracker.
These attachments are available in the static archive:
Reported in version: HG 2.0
Reported for operating system, platform: All, All
Comments on the original bug report:
On 2018-08-13 17:31:45 +0000, Ethan Lee wrote:
On 2018-10-01 16:42:47 +0000, Sam Lantinga wrote:
The text was updated successfully, but these errors were encountered: