diff --git a/osu.Framework/Platform/SDL2Window.cs b/osu.Framework/Platform/SDL2Window.cs
index 2d8ca20688..28f9efa453 100644
--- a/osu.Framework/Platform/SDL2Window.cs
+++ b/osu.Framework/Platform/SDL2Window.cs
@@ -326,7 +326,7 @@ protected virtual void HandleEventFromFilter(SDL.SDL_Event evt)
case SDL.SDL_EventType.SDL_WINDOWEVENT:
// polling via SDL_PollEvent blocks on resizes (https://stackoverflow.com/a/50858339)
- if (evt.window.windowEvent == SDL.SDL_WindowEventID.SDL_WINDOWEVENT_RESIZED)
+ if (evt.window.windowEvent == SDL.SDL_WindowEventID.SDL_WINDOWEVENT_RESIZED && !updatingWindowStateAndSize)
fetchWindowSize();
break;
diff --git a/osu.Framework/Platform/SDL2Window_Windowing.cs b/osu.Framework/Platform/SDL2Window_Windowing.cs
index debf407df1..2d63dde10a 100644
--- a/osu.Framework/Platform/SDL2Window_Windowing.cs
+++ b/osu.Framework/Platform/SDL2Window_Windowing.cs
@@ -534,7 +534,9 @@ private void updateAndFetchWindowSpecifics()
windowState = pendingWindowState.Value;
pendingWindowState = null;
+ updatingWindowStateAndSize = true;
UpdateWindowStateAndSize(windowState, currentDisplay, currentDisplayMode.Value);
+ updatingWindowStateAndSize = false;
fetchWindowSize();
@@ -722,6 +724,15 @@ private void storeWindowPositionToConfig()
///
private bool storingSizeToConfig;
+ ///
+ /// Set when is in progress to avoid being called with invalid data.
+ ///
+ ///
+ /// Since is a multi-step process, intermediary windows size changes might be invalid.
+ /// This is usually not a problem, but since runs out-of-band, invalid data might appear in those events.
+ ///
+ private bool updatingWindowStateAndSize;
+
private void storeWindowSizeToConfig()
{
if (WindowState != WindowState.Normal)