diff --git a/docs/changes.txt b/docs/changes.txt index c9b7521f87..5a49e023ef 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -120,6 +120,7 @@ wxMSW: wxOSX: - Fix handling of non-BMP characters in GetPartialTextExtents() (ARATA Mizuki). +- Implement wxGetDisplaySizeMM() correctly (David Vanderson). - Remove extra borders around wxFilePickerCtrl (John Roberts). - Set up extensions filter correctly in wxFileDialog (nick863). - Turn off automatic quotes substitutions in wxTextCtrl (Xlord2). diff --git a/src/osx/utils_osx.cpp b/src/osx/utils_osx.cpp index d71457c676..a89b043f01 100644 --- a/src/osx/utils_osx.cpp +++ b/src/osx/utils_osx.cpp @@ -157,15 +157,11 @@ bool wxDoLaunchDefaultBrowser(const wxLaunchBrowserParams& params) void wxDisplaySizeMM(int *width, int *height) { - wxDisplaySize(width, height); - // on mac 72 is fixed (at least now;-) - double cvPt2Mm = 25.4 / 72; - - if (width != NULL) - *width = int( *width * cvPt2Mm ); - - if (height != NULL) - *height = int( *height * cvPt2Mm ); + CGSize size = CGDisplayScreenSize(CGMainDisplayID()); + if ( width ) + *width = (int)size.width ; + if ( height ) + *height = (int)size.height; }