src/video/cocoa/SDL_cocoawindow.m
changeset 5478 6b65ff3cee62
parent 5466 006883d5fa51
child 5502 ed5f117c949d
--- a/src/video/cocoa/SDL_cocoawindow.m	Fri Mar 11 16:03:23 2011 -0800
+++ b/src/video/cocoa/SDL_cocoawindow.m	Fri Mar 11 16:54:43 2011 -0800
@@ -670,26 +670,20 @@
 {
     NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
     NSWindow *nswindow = ((SDL_WindowData *) window->driverdata)->nswindow;
-    SDL_VideoDisplay *display = SDL_GetDisplayForWindow(window);
     NSRect rect;
-    SDL_Rect bounds;
+    Uint32 moveHack;
 
-    Cocoa_GetDisplayBounds(_this, display, &bounds);
-    if (SDL_WINDOWPOS_ISCENTERED(window->x)) {
-        rect.origin.x = bounds.x + (bounds.w - window->w) / 2;
-    } else {
-        rect.origin.x = window->x;
-    }
-    if (SDL_WINDOWPOS_ISCENTERED(window->y)) {
-        rect.origin.y = bounds.y + (bounds.h - window->h) / 2;
-    } else {
-        rect.origin.y = window->y;
-    }
+    rect.origin.x = window->x;
+    rect.origin.y = window->y;
     rect.size.width = window->w;
     rect.size.height = window->h;
     ConvertNSRect(&rect);
-    rect = [nswindow frameRectForContentRect:rect];
+
+    moveHack = s_moveHack;
+    s_moveHack = 0;
     [nswindow setFrameOrigin:rect.origin];
+    s_moveHack = moveHack;
+
     [pool release];
 }