Skip to content

Commit f0e768d

Browse files
committed
wayland: Call SetFullscreen directly in ShowWindow.
This cuts out an extra flush when getting the first configure event.
1 parent 8c660cc commit f0e768d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/video/wayland/SDL_waylandwindow.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -778,8 +778,8 @@ void Wayland_ShowWindow(_THIS, SDL_Window *window)
778778
* libdecor will call this as part of their configure event!
779779
* -flibit
780780
*/
781-
Wayland_SetWindowFullscreen(_this, window, SDL_GetDisplayForWindow(window),
782-
(window->flags & SDL_WINDOW_FULLSCREEN) != 0);
781+
SDL_WaylandOutputData *odata = SDL_GetDisplayForWindow(window)->driverdata;
782+
SetFullscreen(window, (window->flags & SDL_WINDOW_FULLSCREEN) ? odata->output : NULL);
783783
if (data->shell_surface.xdg.surface) {
784784
while (!data->shell_surface.xdg.initial_configure_seen) {
785785
WAYLAND_wl_display_flush(c->display);

0 commit comments

Comments
 (0)