Skip to content

Commit

Permalink
wayland: Initialize floating size at window creation
Browse files Browse the repository at this point in the history
This allows the windowed size to be restored for windows initially
created already in non-floating state.
  • Loading branch information
dos1 authored and flibitijibibo committed Aug 2, 2021
1 parent dab3384 commit b5210ca
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/video/wayland/SDL_waylandwindow.c
Expand Up @@ -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);
Expand Down

0 comments on commit b5210ca

Please sign in to comment.