mirror of
https://github.com/Ryujinx/SDL.git
synced 2024-12-23 00:25:27 +00:00
Fix window size in X11 when window manager refuses to resize
(cherry picked from commit a67ae8eed57f4545c739e6eb3a4b8c1169d3afbc)
This commit is contained in:
parent
f741adc86c
commit
74e8a6451b
|
@ -418,7 +418,7 @@ int X11_CreateWindow(_THIS, SDL_Window *window)
|
|||
#if SDL_VIDEO_OPENGL_EGL
|
||||
if (((_this->gl_config.profile_mask == SDL_GL_CONTEXT_PROFILE_ES) ||
|
||||
SDL_GetHintBoolean(SDL_HINT_VIDEO_X11_FORCE_EGL, SDL_FALSE))
|
||||
#if SDL_VIDEO_OPENGL_GLX
|
||||
#if SDL_VIDEO_OPENGL_GLX
|
||||
&& ( !_this->gl_data || X11_GL_UseEGL(_this) )
|
||||
#endif
|
||||
) {
|
||||
|
@ -641,9 +641,9 @@ int X11_CreateWindow(_THIS, SDL_Window *window)
|
|||
if ((window->flags & SDL_WINDOW_OPENGL) &&
|
||||
((_this->gl_config.profile_mask == SDL_GL_CONTEXT_PROFILE_ES) ||
|
||||
SDL_GetHintBoolean(SDL_HINT_VIDEO_X11_FORCE_EGL, SDL_FALSE))
|
||||
#if SDL_VIDEO_OPENGL_GLX
|
||||
#if SDL_VIDEO_OPENGL_GLX
|
||||
&& ( !_this->gl_data || X11_GL_UseEGL(_this) )
|
||||
#endif
|
||||
#endif
|
||||
) {
|
||||
#if SDL_VIDEO_OPENGL_EGL
|
||||
if (!_this->egl_data) {
|
||||
|
@ -979,6 +979,10 @@ void X11_SetWindowSize(_THIS, SDL_Window *window)
|
|||
}
|
||||
|
||||
if (SDL_TICKS_PASSED(SDL_GetTicks(), timeout)) {
|
||||
/* Timeout occurred and window size didn't change
|
||||
* wwindow manager likely denied the resize. */
|
||||
window->w = orig_w;
|
||||
window->h = orig_h;
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue