mirror of
https://github.com/Ryujinx/SDL.git
synced 2024-12-23 17:25:27 +00:00
X11 Segmentation fault with multiple windows and renderers (see #5256)
This commit is contained in:
parent
4cb6181808
commit
85e6500065
|
@ -1659,9 +1659,15 @@ void
|
||||||
X11_SetWindowMouseGrab(_THIS, SDL_Window * window, SDL_bool grabbed)
|
X11_SetWindowMouseGrab(_THIS, SDL_Window * window, SDL_bool grabbed)
|
||||||
{
|
{
|
||||||
SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
|
SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
|
||||||
Display *display = data->videodata->display;
|
Display *display;
|
||||||
SDL_bool oldstyle_fullscreen;
|
SDL_bool oldstyle_fullscreen;
|
||||||
|
|
||||||
|
if (data == NULL) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
display = data->videodata->display;
|
||||||
|
|
||||||
/* ICCCM2.0-compliant window managers can handle fullscreen windows
|
/* ICCCM2.0-compliant window managers can handle fullscreen windows
|
||||||
If we're using XVidMode to change resolution we need to confine
|
If we're using XVidMode to change resolution we need to confine
|
||||||
the cursor so we don't pan around the virtual desktop.
|
the cursor so we don't pan around the virtual desktop.
|
||||||
|
@ -1719,7 +1725,13 @@ void
|
||||||
X11_SetWindowKeyboardGrab(_THIS, SDL_Window * window, SDL_bool grabbed)
|
X11_SetWindowKeyboardGrab(_THIS, SDL_Window * window, SDL_bool grabbed)
|
||||||
{
|
{
|
||||||
SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
|
SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
|
||||||
Display *display = data->videodata->display;
|
Display *display;
|
||||||
|
|
||||||
|
if (data == NULL) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
display = data->videodata->display;
|
||||||
|
|
||||||
if (grabbed) {
|
if (grabbed) {
|
||||||
/* If the window is unmapped, XGrab calls return GrabNotViewable,
|
/* If the window is unmapped, XGrab calls return GrabNotViewable,
|
||||||
|
|
Loading…
Reference in a new issue