From b5210cac44b5d2f58713a4b1399e1ea262743943 Mon Sep 17 00:00:00 2001 From: Sebastian Krzyszkowiak Date: Mon, 2 Aug 2021 13:47:32 +0200 Subject: [PATCH] wayland: Initialize floating size at window creation This allows the windowed size to be restored for windows initially created already in non-floating state. --- src/video/wayland/SDL_waylandwindow.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/video/wayland/SDL_waylandwindow.c b/src/video/wayland/SDL_waylandwindow.c index 80384c7b09097..e74d43b817162 100644 --- a/src/video/wayland/SDL_waylandwindow.c +++ b/src/video/wayland/SDL_waylandwindow.c @@ -1132,6 +1132,9 @@ int Wayland_CreateWindow(_THIS, SDL_Window *window) data->outputs = NULL; data->num_outputs = 0; + data->floating_width = window->windowed.w; + data->floating_height = window->windowed.h; + data->surface = wl_compositor_create_surface(c->compositor); wl_surface_add_listener(data->surface, &surface_listener, data);