From 2d9aff6433f373c2eb36af6d1e106249d4493e86 Mon Sep 17 00:00:00 2001 From: Frank Praznik Date: Wed, 3 Apr 2024 11:07:08 -0400 Subject: [PATCH] wayland: Always use the whole buffer surface for the damage region Using the current window size at the time of the call may not be correct if the window or buffer size was changed after the fact, so always set the damage region to cover the entire buffer. --- src/video/wayland/SDL_waylandwindow.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/video/wayland/SDL_waylandwindow.c b/src/video/wayland/SDL_waylandwindow.c index 1daf6310a..c68860cc5 100644 --- a/src/video/wayland/SDL_waylandwindow.c +++ b/src/video/wayland/SDL_waylandwindow.c @@ -582,11 +582,9 @@ static void surface_frame_done(void *data, struct wl_callback *cb, uint32_t time * on compositor version 4 and above. */ if (wl_compositor_get_version(wind->waylandData->compositor) >= WL_SURFACE_DAMAGE_BUFFER_SINCE_VERSION) { - wl_surface_damage_buffer(wind->surface, 0, 0, - wind->current.drawable_width, wind->current.drawable_height); + wl_surface_damage_buffer(wind->surface, 0, 0, SDL_MAX_SINT32, SDL_MAX_SINT32); } else { - wl_surface_damage(wind->surface, 0, 0, - wind->current.logical_width, wind->current.logical_height); + wl_surface_damage(wind->surface, 0, 0, SDL_MAX_SINT32, SDL_MAX_SINT32); } if (wind->surface_status == WAYLAND_SURFACE_STATUS_WAITING_FOR_FRAME) {