OS X fix:
[blender.git] / intern / ghost / intern / GHOST_SystemCarbon.cpp
index 88bc859be6e1a524da45ae053c9d12035875d673..e7f087a86bcd8da31be5e83117d607740edaed44 100644 (file)
@@ -899,16 +899,18 @@ bool GHOST_SystemCarbon::handleMouseDown(EventRef event)
                                        if (macState == 2) { // always ok
                                                        ::ZoomWindow(window, part, true);
                                                        ghostWindow->setMac_windowState(1);
-                                               } else { // need to force size again
-                                                       GHOST_TUns32 scr_x,scr_y;
+                                       } else { // need to force size again
+                                               GHOST_TUns32 scr_x,scr_y;
+                                               Rect outAvailableRect;
                                                
-                                                       ghostWindow->setMac_windowState(2);
+                                               ghostWindow->setMac_windowState(2);
+                                               ::GetAvailableWindowPositioningBounds ( GetMainDevice(), &outAvailableRect);
                                                
-                                                       this->getMainDisplayDimensions(scr_x,scr_y);
-                                                       ::SizeWindow (window, scr_x,scr_y-22,false);
-                                                       ::MoveWindow (window, 1,22,true);
-                                               }
-
+                                               //this->getMainDisplayDimensions(scr_x,scr_y);
+                                               ::SizeWindow (window, outAvailableRect.right-outAvailableRect.left,outAvailableRect.bottom-outAvailableRect.top-1,false);
+                                               ::MoveWindow (window, outAvailableRect.left, outAvailableRect.top,true);
+                                       }
+                               
                        }
                        break;