X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/79a73b4f86090278c242a8cca5fd9147a31a4419..e3f9e20cb15c62bd347a8e52d2d36529adbdb3d6:/src/mac/carbon/utils.cpp diff --git a/src/mac/carbon/utils.cpp b/src/mac/carbon/utils.cpp index ab012ec103..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) @@ -1152,10 +1165,10 @@ wxString wxMacCFStringHolder::AsString(wxFontEncoding encoding) #else CFIndex cStrLen ; CFStringGetBytes( m_cfs , CFRangeMake(0, cflen) , wxMacGetSystemEncFromFontEnc( encoding ) , - '?' , false , NULL , 0 , cStrLen ) ; + '?' , false , NULL , 0 , &cStrLen ) ; buf = new wxChar[ cStrLen + 1 ] ; - CFStringGetBytes( m_cfs , CFRangeMake(0, len) , wxMacGetSystemEncFromFontEnc( encoding ) , - '?' , false , (void*) buf , cStrLen , &StrLen) ; + CFStringGetBytes( m_cfs , CFRangeMake(0, cflen) , wxMacGetSystemEncFromFontEnc( encoding ) , + '?' , false , (unsigned char*) buf , cStrLen , &cStrLen) ; noChars = cStrLen ; #endif