Commit 56d603e6 authored by Sam Lantinga's avatar Sam Lantinga

Don't crash when resizing non-shaped windows

parent b0b0c5e0
......@@ -117,7 +117,8 @@ static __inline__ void ConvertNSRect(NSRect *r)
NSRect rect = [_data->nswindow contentRectForFrameRect:[_data->nswindow frame]];
w = (int)rect.size.width;
h = (int)rect.size.height;
Cocoa_ResizeWindowShape(_data->window);
if (SDL_IsShapedWindow(_data->window))
Cocoa_ResizeWindowShape(_data->window);
SDL_SendWindowEvent(_data->window, SDL_WINDOWEVENT_RESIZED, w, h);
}
......
......@@ -942,7 +942,7 @@ X11_SetWindowSize(_THIS, SDL_Window * window)
SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
Display *display = data->videodata->display;
if(SDL_IsShapedWindow(window))
if (SDL_IsShapedWindow(window))
X11_ResizeWindowShape(window);
XResizeWindow(display, data->xwindow, window->w, window->h);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment