diff --git a/src/video/wayland/SDL_waylandwindow.c b/src/video/wayland/SDL_waylandwindow.c index ebf79a2609..2cec73cac2 100644 --- a/src/video/wayland/SDL_waylandwindow.c +++ b/src/video/wayland/SDL_waylandwindow.c @@ -441,13 +441,15 @@ static bool ConfigureWindowGeometry(SDL_Window *window) */ SetMinMaxDimensions(window); - // Unconditionally send the window and drawable size, the video core will deduplicate when required. - if (!data->scale_to_display) { - SDL_SendWindowEvent(window, SDL_EVENT_WINDOW_RESIZED, window_width, window_height); - } else { - SDL_SendWindowEvent(window, SDL_EVENT_WINDOW_RESIZED, data->current.pixel_width, data->current.pixel_height); + if (data->shell_surface_status != WAYLAND_SHELL_SURFACE_STATUS_HIDDEN) { + // Unconditionally send the window and drawable size, the video core will deduplicate when required. + if (!data->scale_to_display) { + SDL_SendWindowEvent(window, SDL_EVENT_WINDOW_RESIZED, window_width, window_height); + } else { + SDL_SendWindowEvent(window, SDL_EVENT_WINDOW_RESIZED, data->current.pixel_width, data->current.pixel_height); + } + SDL_SendWindowEvent(window, SDL_EVENT_WINDOW_PIXEL_SIZE_CHANGED, data->current.pixel_width, data->current.pixel_height); } - SDL_SendWindowEvent(window, SDL_EVENT_WINDOW_PIXEL_SIZE_CHANGED, data->current.pixel_width, data->current.pixel_height); /* Send an exposure event if the window is in the shown state and the size has changed, * even if the window is occluded, as the client needs to commit a new frame for the