X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7cfebe05f03443c6f91197f93cd2749270df6666..1b6f93fcfe211e81c77d7485c4c3786a846c84df:/src/mac/utils.cpp diff --git a/src/mac/utils.cpp b/src/mac/utils.cpp index 9c4bc2c8ce..2ab9256cc5 100644 --- a/src/mac/utils.cpp +++ b/src/mac/utils.cpp @@ -461,15 +461,20 @@ int wxDisplayDepth() // Get size of display void wxDisplaySize(int *width, int *height) { - wxClientDisplayRect( NULL , NULL , width , height ) ; + BitMap screenBits; + GetQDGlobalsScreenBits( &screenBits ); + + *width = screenBits.bounds.right - screenBits.bounds.left ; + *height = screenBits.bounds.bottom - screenBits.bounds.top ; } void wxDisplaySizeMM(int *width, int *height) { - wxDisplaySize(width, height); - // on mac 72 is fixed (at least now ;-) - *width *= 25.4 / 72 ; - *height *= 25.4 / 72 ; + wxDisplaySize(width, height); + // on mac 72 is fixed (at least now ;-) + float cvPt2Mm = 25.4 / 72; + *width = int( *width * cvPt2Mm ); + *height = int( *height * cvPt2Mm ); } void wxClientDisplayRect(int *x, int *y, int *width, int *height)