Skip to content

Commit

Permalink
wayland: Call SetWindowBordered at the end of ShowWindow
Browse files Browse the repository at this point in the history
  • Loading branch information
flibitijibibo authored and slouken committed May 10, 2021
1 parent c5dd996 commit f2f451a
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/video/wayland/SDL_waylandwindow.c
Original file line number Diff line number Diff line change
Expand Up @@ -700,7 +700,6 @@ void Wayland_ShowWindow(_THIS, SDL_Window *window)

/* Restore state that was set prior to this call */
Wayland_SetWindowTitle(_this, window);
Wayland_SetWindowBordered(_this, window, (window->flags & SDL_WINDOW_BORDERLESS) == 0);
if (window->flags & SDL_WINDOW_MAXIMIZED) {
Wayland_MaximizeWindow(_this, window);
}
Expand Down Expand Up @@ -732,6 +731,15 @@ void Wayland_ShowWindow(_THIS, SDL_Window *window)
}
}
}

/* Unlike the rest of window state we have to set this _after_ flushing the
* display, because we need to create the decorations before possibly hiding
* them immediately afterward. But don't call it redundantly, the protocol
* may not interpret a redundant call nicely and cause weird stuff to happen
*/
if (window->flags & SDL_WINDOW_BORDERLESS) {
Wayland_SetWindowBordered(_this, window, SDL_FALSE);
}
}

void Wayland_HideWindow(_THIS, SDL_Window *window)
Expand Down

0 comments on commit f2f451a

Please sign in to comment.