Don't crash when resizing non-shaped windows
This commit is contained in:
parent
b0b0c5e0e9
commit
56d603e6e1
2 changed files with 3 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue