summaryrefslogtreecommitdiff
path: root/vcl/aqua/source/window/salframe.cxx
diff options
context:
space:
mode:
authorFrank Schoenheit [fs] <frank.schoenheit@oracle.com>2010-12-02 12:00:43 +0100
committerFrank Schoenheit [fs] <frank.schoenheit@oracle.com>2010-12-02 12:00:43 +0100
commitcda10a2d67d77b74cafb41c5ce294c2fd195dc66 (patch)
tree002c9e55808000786b31f67f329baf7d02545c8d /vcl/aqua/source/window/salframe.cxx
parent0fbdce7fd45d8e11e7b5482d79dd3f53899d7be3 (diff)
parent8dc3743ca56382374183bec5cd1a11d53f3085b8 (diff)
Automated merge with ssh://hg.services.openoffice.org/cws/gridcontrol07
Diffstat (limited to 'vcl/aqua/source/window/salframe.cxx')
-rw-r--r--vcl/aqua/source/window/salframe.cxx25
1 files changed, 19 insertions, 6 deletions
diff --git a/vcl/aqua/source/window/salframe.cxx b/vcl/aqua/source/window/salframe.cxx
index ce4370c57b9f..4530778c5775 100644
--- a/vcl/aqua/source/window/salframe.cxx
+++ b/vcl/aqua/source/window/salframe.cxx
@@ -578,12 +578,27 @@ void AquaSalFrame::SetWindowState( const SalFrameState* pState )
VCLToCocoa( aStateRect );
aStateRect = [NSWindow frameRectForContentRect: aStateRect styleMask: mnStyleMask];
- // relase and acquire mutex again since this call can block waiting for an internal lock
+ [mpWindow setFrame: aStateRect display: NO];
+ if( pState->mnState == SAL_FRAMESTATE_MINIMIZED )
+ [mpWindow miniaturize: NSApp];
+ else if( [mpWindow isMiniaturized] )
+ [mpWindow deminiaturize: NSApp];
+
+
+ /* ZOOMED is not really maximized (actually it toggles between a user set size and
+ the program specified one), but comes closest since the default behavior is
+ "maximized" if the user did not intervene
+ */
+ if( pState->mnState == SAL_FRAMESTATE_MAXIMIZED )
{
- [mpWindow setFrame: aStateRect display: NO];
+ if(! [mpWindow isZoomed])
+ [mpWindow zoom: NSApp];
+ }
+ else
+ {
+ if( [mpWindow isZoomed] )
+ [mpWindow zoom: NSApp];
}
-
- // FIXME: HTH maximized state ?
// get new geometry
UpdateFrameGeometry();
@@ -641,8 +656,6 @@ BOOL AquaSalFrame::GetWindowState( SalFrameState* pState )
pState->mnWidth = long(aStateRect.size.width);
pState->mnHeight = long(aStateRect.size.height);
- // FIXME: HTH maximized state ?
-
if( [mpWindow isMiniaturized] )
pState->mnState = SAL_FRAMESTATE_MINIMIZED;
else if( ! [mpWindow isZoomed] )