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,6 +117,7 @@ static __inline__ void ConvertNSRect(NSRect *r)
|
||||||
NSRect rect = [_data->nswindow contentRectForFrameRect:[_data->nswindow frame]];
|
NSRect rect = [_data->nswindow contentRectForFrameRect:[_data->nswindow frame]];
|
||||||
w = (int)rect.size.width;
|
w = (int)rect.size.width;
|
||||||
h = (int)rect.size.height;
|
h = (int)rect.size.height;
|
||||||
|
if (SDL_IsShapedWindow(_data->window))
|
||||||
Cocoa_ResizeWindowShape(_data->window);
|
Cocoa_ResizeWindowShape(_data->window);
|
||||||
SDL_SendWindowEvent(_data->window, SDL_WINDOWEVENT_RESIZED, w, h);
|
SDL_SendWindowEvent(_data->window, SDL_WINDOWEVENT_RESIZED, w, h);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue