mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-11-20 01:01:12 +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,7 +441,6 @@ static bool ConfigureWindowGeometry(SDL_Window *window)
|
|||||||
*/
|
*/
|
||||||
SetMinMaxDimensions(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.
|
// Unconditionally send the window and drawable size, the video core will deduplicate when required.
|
||||||
if (!data->scale_to_display) {
|
if (!data->scale_to_display) {
|
||||||
SDL_SendWindowEvent(window, SDL_EVENT_WINDOW_RESIZED, window_width, window_height);
|
SDL_SendWindowEvent(window, SDL_EVENT_WINDOW_RESIZED, window_width, window_height);
|
||||||
@@ -449,7 +448,6 @@ static bool ConfigureWindowGeometry(SDL_Window *window)
|
|||||||
SDL_SendWindowEvent(window, SDL_EVENT_WINDOW_RESIZED, data->current.pixel_width, data->current.pixel_height);
|
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,
|
/* 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
|
* even if the window is occluded, as the client needs to commit a new frame for the
|
||||||
|
|||||||
Reference in New Issue
Block a user