Restore Cocoa title bar caption when adding border to a window.

This commit is contained in:
Ryan C. Gordon 2012-09-14 11:36:36 -04:00
parent 7f3b2ca47f
commit fd7c6b9e79

View file

@ -830,6 +830,9 @@ Cocoa_SetWindowBordered(_THIS, SDL_Window * window, SDL_bool bordered)
NSWindow *nswindow = ((SDL_WindowData *) window->driverdata)->nswindow;
if ([nswindow respondsToSelector:@selector(setStyleMask:)]) {
[nswindow setStyleMask:GetWindowStyle(window)];
if (bordered) {
Cocoa_SetWindowTitle(_this, window); // this got blanked out.
}
}
[pool release];
#endif