video: Don't switch display modes when emulating mode changes
SDL uses window minimization to determine fullscreen window visibility and hide windows before changing the video mode back to the desktop. Wayland, however, does not have the concept of a minimized window and doesn't set the minimized flag (minimization can be requested, but what actually happens to the window is implementation dependent, and if a window is minimized via a desktop shortcut or decoration control, the application is not notified of any state changes). Make the video core mode setting a no-op so that the Wayland backend can handle reporting the display dimensions using its own internal logic.
This commit is contained in:
parent
7def1438c3
commit
7d439b87b0
@ -1124,6 +1124,11 @@ const SDL_DisplayMode *SDL_GetCurrentDisplayMode(SDL_DisplayID displayID)
|
||||
|
||||
static int SDL_SetDisplayModeForDisplay(SDL_VideoDisplay *display, SDL_DisplayMode *mode)
|
||||
{
|
||||
/* Mode switching is being emulated per-window; nothing to do and cannot fail. */
|
||||
if (ModeSwitchingEmulated(_this)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!mode) {
|
||||
mode = &display->desktop_mode;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user