From b4afc5ec3793511a2606d749d68d2f0f80155871 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Sat, 18 Oct 2008 16:09:33 +0000 Subject: [PATCH 1/1] adapting to API change from GetContentAreaInset to GetContentArea, fixes #10071 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56425 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/osx/carbon/nonownedwnd.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/osx/carbon/nonownedwnd.cpp b/src/osx/carbon/nonownedwnd.cpp index 2fe95a95cc..67c13fac0b 100644 --- a/src/osx/carbon/nonownedwnd.cpp +++ b/src/osx/carbon/nonownedwnd.cpp @@ -1535,7 +1535,7 @@ bool wxNonOwnedWindowCarbonImpl::ShowFullScreen(bool show, long style) wxRect client = wxGetClientDisplayRect() ; - int left , top , right , bottom ; + int left, top, width, height ; int x, y, w, h ; x = client.x ; @@ -1543,19 +1543,23 @@ bool wxNonOwnedWindowCarbonImpl::ShowFullScreen(bool show, long style) w = client.width ; h = client.height ; - GetContentArea( left , top , right , bottom ) ; + GetContentArea( left, top, width, height ) ; + int outerwidth, outerheight; + GetSize( outerwidth, outerheight ); if ( style & wxFULLSCREEN_NOCAPTION ) { y -= top ; h += top ; + // avoid adding the caption twice to the height + outerheight -= top; } if ( style & wxFULLSCREEN_NOBORDER ) { x -= left ; - w += left + right ; - h += bottom ; + w += outerwidth - width; + h += outerheight - height; } if ( style & wxFULLSCREEN_NOTOOLBAR ) -- 2.45.2