]> git.saurik.com Git - wxWidgets.git/commitdiff
correct boundaries for carbon
authorStefan Csomor <csomor@advancedconcepts.ch>
Thu, 19 Feb 2004 05:32:09 +0000 (05:32 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Thu, 19 Feb 2004 05:32:09 +0000 (05:32 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25858 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/carbon/utils.cpp
src/mac/utils.cpp

index ebdbc7082f642b789df1f4e693cd3a9187b0e67f..83f22581055e72aa7957f2b1199b9e182436c373 100644 (file)
@@ -456,6 +456,18 @@ void wxDisplaySizeMM(int *width, int *height)
 
 void wxClientDisplayRect(int *x, int *y, int *width, int *height)
 {
+#if TARGET_CARBON
+    Rect r ;
+    GetAvailableWindowPositioningBounds( GetMainDevice() , &r ) ;
+    if ( x )
+        *x = r.left ;
+    if ( y )
+        *y = r.top ;
+    if ( width )
+        *width = r.right - r.left ;
+    if ( height )
+        *height = r.bottom - r.top ;
+#else
     BitMap screenBits;
     GetQDGlobalsScreenBits( &screenBits );
 
@@ -480,6 +492,7 @@ void wxClientDisplayRect(int *x, int *y, int *width, int *height)
     }
     if (y)
         *y = mheight ;
+#endif
 }
 
 wxWindow* wxFindWindowAtPoint(const wxPoint& pt)
index ebdbc7082f642b789df1f4e693cd3a9187b0e67f..83f22581055e72aa7957f2b1199b9e182436c373 100644 (file)
@@ -456,6 +456,18 @@ void wxDisplaySizeMM(int *width, int *height)
 
 void wxClientDisplayRect(int *x, int *y, int *width, int *height)
 {
+#if TARGET_CARBON
+    Rect r ;
+    GetAvailableWindowPositioningBounds( GetMainDevice() , &r ) ;
+    if ( x )
+        *x = r.left ;
+    if ( y )
+        *y = r.top ;
+    if ( width )
+        *width = r.right - r.left ;
+    if ( height )
+        *height = r.bottom - r.top ;
+#else
     BitMap screenBits;
     GetQDGlobalsScreenBits( &screenBits );
 
@@ -480,6 +492,7 @@ void wxClientDisplayRect(int *x, int *y, int *width, int *height)
     }
     if (y)
         *y = mheight ;
+#endif
 }
 
 wxWindow* wxFindWindowAtPoint(const wxPoint& pt)