From ee658398812ab334b39a2632cd99e2ffe6d4bc79 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Thu, 19 Feb 2004 05:32:09 +0000 Subject: [PATCH] correct boundaries for carbon git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25858 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/mac/carbon/utils.cpp | 13 +++++++++++++ src/mac/utils.cpp | 13 +++++++++++++ 2 files changed, 26 insertions(+) diff --git a/src/mac/carbon/utils.cpp b/src/mac/carbon/utils.cpp index ebdbc7082f..83f2258105 100644 --- a/src/mac/carbon/utils.cpp +++ b/src/mac/carbon/utils.cpp @@ -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) diff --git a/src/mac/utils.cpp b/src/mac/utils.cpp index ebdbc7082f..83f2258105 100644 --- a/src/mac/utils.cpp +++ b/src/mac/utils.cpp @@ -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) -- 2.45.2