mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-11-19 16:51:13 +00:00
Revert "wayland: Don't send size events while the window is hidden"
This reverts commit 0825d07a43.
It turns out that resizing while hidden is fine, the real problem in https://github.com/libsdl-org/sdl2-compat/issues/268 is that SDL2 did not send an initial resize event and SDL3 does, which we're fixing in a better way in sdl2-compat.
This commit is contained in:
@@ -441,15 +441,13 @@ static bool ConfigureWindowGeometry(SDL_Window *window)
|
||||
*/
|
||||
SetMinMaxDimensions(window);
|
||||
|
||||
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);
|
||||
// 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);
|
||||
|
||||
/* 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
|
||||
|
||||
Reference in New Issue
Block a user