wayland: Remove XDG surface geometry calls These were needed to fix some buggy behavior regarding committing old buffer sizes when entering fullscreen that has since been corrected. Remove them.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
diff --git a/src/video/wayland/SDL_waylandwindow.c b/src/video/wayland/SDL_waylandwindow.c
index 5d8be17..c72575f 100644
--- a/src/video/wayland/SDL_waylandwindow.c
+++ b/src/video/wayland/SDL_waylandwindow.c
@@ -493,20 +493,15 @@ UpdateWindowFullscreen(SDL_Window *window, SDL_bool fullscreen)
static void
CommitWindowGeometry(SDL_Window *window)
{
+#ifdef HAVE_LIBDECOR_H
SDL_WindowData *wind = (SDL_WindowData *) window->driverdata;
- SDL_VideoData *viddata = (SDL_VideoData *) wind->waylandData;
-#ifdef HAVE_LIBDECOR_H
if (wind->shell_surface_type == WAYLAND_SURFACE_LIBDECOR && wind->shell_surface.libdecor.frame) {
struct libdecor_state *state = libdecor_state_new(wind->window_width, wind->window_height);
libdecor_frame_commit(wind->shell_surface.libdecor.frame, state, NULL);
libdecor_state_free(state);
- } else
-#endif
- if (viddata->shell.xdg && wind->shell_surface.xdg.surface) {
- xdg_surface_set_window_geometry(wind->shell_surface.xdg.surface, 0, 0,
- wind->window_width, wind->window_height);
}
+#endif
}
static const struct wl_callback_listener surface_damage_frame_listener;
@@ -2098,7 +2093,6 @@ static void
Wayland_HandleResize(SDL_Window *window, int width, int height, float scale)
{
SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
- SDL_VideoData *viddata = data->waylandData;
const int old_w = window->w, old_h = window->h;
const int old_drawable_width = data->drawable_width;
const int old_drawable_height = data->drawable_height;
@@ -2121,21 +2115,6 @@ Wayland_HandleResize(SDL_Window *window, int width, int height, float scale)
window->h = height;
data->needs_resize_event = SDL_FALSE;
}
-
- /* XXX: This workarounds issues with commiting buffers with old size after
- * already acknowledging the new size, which can cause protocol violations.
- * It doesn't fix the first frames after resize being glitched visually,
- * but at least lets us not be terminated by the compositor.
- * Can be removed once SDL's resize logic becomes compliant. */
- if (
-#ifdef HAVE_LIBDECOR_H
- data->shell_surface_type != WAYLAND_SURFACE_LIBDECOR &&
-#endif
- viddata->shell.xdg &&
- data->shell_surface.xdg.surface) {
- xdg_surface_set_window_geometry(data->shell_surface.xdg.surface, 0, 0,
- data->window_width, data->window_height);
- }
}
void