src/video/cocoa/SDL_cocoawindow.m
changeset 6422 fd0ac1b56115
parent 6301 e8a69c5378e7
child 6426 38ed71d9ae5f
--- a/src/video/cocoa/SDL_cocoawindow.m	Thu Sep 13 01:29:18 2012 -0400
+++ b/src/video/cocoa/SDL_cocoawindow.m	Thu Sep 13 01:43:53 2012 -0400
@@ -822,6 +822,20 @@
 }
 
 void
+Cocoa_SetWindowBordered(_THIS, SDL_Window * window, SDL_bool bordered)
+{
+    /* this message arrived in 10.6. You're out of luck on older OSes. */
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1060
+    NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+    NSWindow *nswindow = ((SDL_WindowData *) window->driverdata)->nswindow;
+    if ([nswindow respondsToSelector:@selector(setStyleMask:)]) {
+        [nswindow setStyleMask:GetWindowStyle(window)];
+    }
+    [pool release];
+#endif
+}
+
+void
 Cocoa_SetWindowFullscreen(_THIS, SDL_Window * window, SDL_VideoDisplay * display, SDL_bool fullscreen)
 {
     NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];