X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4e675101a7fabdeaed5520257bf3dda457f54178..3cfcae3b4d5a8a84c19d74a211a97da47ffe0dc6:/src/mac/carbon/display.cpp diff --git a/src/mac/carbon/display.cpp b/src/mac/carbon/display.cpp index a69b111ae8..3e9d8d50a1 100644 --- a/src/mac/carbon/display.cpp +++ b/src/mac/carbon/display.cpp @@ -63,6 +63,7 @@ public: } virtual wxRect GetGeometry() const; + virtual wxRect GetClientArea() const; virtual wxString GetName() const { return wxString(); } virtual wxArrayVideoModes GetModes(const wxVideoMode& mode) const; @@ -173,6 +174,17 @@ wxRect wxDisplayImplMacOSX::GetGeometry() const (int)theRect.size.height ); //floats } +wxRect wxDisplayImplMacOSX::GetClientArea() const +{ + // VZ: I don't know how to get client area for arbitrary display but + // wxGetClientDisplayRect() does work correctly for at least the main + // one (TODO: do it correctly for the other displays too) + if ( IsPrimary() ) + return wxGetClientDisplayRect(); + + return wxDisplayImpl::GetClientArea(); +} + static int wxCFDictKeyToInt( CFDictionaryRef desc, CFStringRef key ) { CFNumberRef value = (CFNumberRef) CFDictionaryGetValue( desc, key );