From 15938c2480a0de8c3ce5bc7289cf3df2d73918ac Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Thu, 3 Jan 2013 21:55:35 +0200 Subject: fdo#58963: Revert "fdo#39983: Support Mac OS X 10.7 full-screen mode" It caused breakage of the existing slide-show full-screen mode. So let's revert for now. --- vcl/aqua/source/window/salframe.cxx | 58 ---------------------------------- vcl/aqua/source/window/salframeview.mm | 37 ---------------------- vcl/inc/aqua/salframeview.h | 2 -- 3 files changed, 97 deletions(-) diff --git a/vcl/aqua/source/window/salframe.cxx b/vcl/aqua/source/window/salframe.cxx index 388dffd90a8f..da36cfab633f 100644 --- a/vcl/aqua/source/window/salframe.cxx +++ b/vcl/aqua/source/window/salframe.cxx @@ -46,25 +46,6 @@ #include #include "postmac.h" -#if MACOSX_SDK_VERSION < 1070 - -enum { - NSFullScreenWindowMask = (1 << 14) -}; - -enum { - NSWindowCollectionBehaviorFullScreenPrimary = (1 << 7), - NSWindowCollectionBehaviorFullScreenAuxiliary = (1 << 8) -}; - -#if MACOSX_SDK_VERSION < 1050 - -typedef NSUInteger NSWindowCollectionBehavior; - -#endif - -#endif - using namespace std; // ======================================================================= @@ -214,31 +195,6 @@ void AquaSalFrame::initWindowAndView() return; } - // On 10.7 and later, if the window is suitable and is - // resizable, we make it full-screenable. - - bool bAllowFullScreen = (0 == (mnStyle & (SAL_FRAME_STYLE_DIALOG | SAL_FRAME_STYLE_TOOLTIP | SAL_FRAME_STYLE_SYSTEMCHILD | SAL_FRAME_STYLE_FLOAT | SAL_FRAME_STYLE_TOOLWINDOW | SAL_FRAME_STYLE_INTRO))); - bAllowFullScreen &= (0 == (~mnStyle & (SAL_FRAME_STYLE_SIZEABLE))); - bAllowFullScreen &= (mpParent == NULL); - - if (GetSalData()->mnSystemVersion >= 0x1070 && - ((mnStyleMask & NSTitledWindowMask) && (mnStyleMask & NSResizableWindowMask))) { - - // Hmm. The docs say that one should use NSInvocation whenever - // the method does not return an object. collectionBehavior - // returns an NSWindowCollectionBehavior (NSUInteger). So - // should I? Or maybe I should just use the low-level - // objc_msgSend()? - NSWindowCollectionBehavior behavior = (NSWindowCollectionBehavior) [mpWindow performSelector: @selector(collectionBehavior)]; - - SAL_INFO("vcl.macosx", OSL_THIS_FUNC << ": bAllowFullScreen=" << bAllowFullScreen << ", behavior=" << hex << behavior); - - [mpWindow performSelector: @selector(setCollectionBehavior:) withObject: (id) (behavior | (bAllowFullScreen ? NSWindowCollectionBehaviorFullScreenPrimary : NSWindowCollectionBehaviorFullScreenAuxiliary))]; - - behavior = (NSWindowCollectionBehavior) [mpWindow performSelector: @selector(collectionBehavior)]; - SAL_INFO("vcl.macosx", OSL_THIS_FUNC << ": after setCollectionBehavior: behavior=" << hex << behavior); - } - if( (mnStyle & SAL_FRAME_STYLE_TOOLTIP) ) [mpWindow setIgnoresMouseEvents: YES]; else @@ -791,20 +747,6 @@ void AquaSalFrame::ShowFullScreen( sal_Bool bFullScreen, sal_Int32 nDisplay ) mbFullScreen = bFullScreen; - if (GetSalData()->mnSystemVersion >= 0x1070) { - // If the system full-screen state already is our desired, do nothing - if ((([mpWindow styleMask] & NSFullScreenWindowMask) == NSFullScreenWindowMask) == mbFullScreen) - return; - - SAL_INFO("vcl.macosx", OSL_THIS_FUNC << ": calling toggleFullScreen()"); - - // Otherwise toggle the system full-screen state - [mpWindow performSelector: @selector(toggleFullScreen:)]; - - // Nothing more to do? - return; - } - if( bFullScreen ) { // hide the dock and the menubar if we are on the menu screen diff --git a/vcl/aqua/source/window/salframeview.mm b/vcl/aqua/source/window/salframeview.mm index 621b982b6ce5..d6861a489277 100644 --- a/vcl/aqua/source/window/salframeview.mm +++ b/vcl/aqua/source/window/salframeview.mm @@ -273,43 +273,6 @@ static AquaSalFrame* getMouseContainerFrame() } } --(void)windowDidEnterFullScreen: (NSNotification*)pNotification -{ - (void)pNotification; - YIELD_GUARD; - - if( !mpFrame || !AquaSalFrame::isAlive( mpFrame)) - return; - - SAL_INFO("vcl.macosx", OSL_THIS_FUNC << ": mbFullScreen was " << mpFrame->mbFullScreen); - - mpFrame->mbFullScreen = true; -} - --(void)windowDidExitFullScreen: (NSNotification*)pNotification -{ - (void)pNotification; - YIELD_GUARD; - - if( !mpFrame || !AquaSalFrame::isAlive( mpFrame)) - return; - - SAL_INFO("vcl.macosx", OSL_THIS_FUNC << ": mbFullScreen was " << mpFrame->mbFullScreen); - - mpFrame->mbFullScreen = false; - - // Without this, if viewing the Start Centre in the system - // full-screen state, when going back using the system's - // unfulscreen menubar button, the Start Centre ends up - // garbled. For some reason the same doesn't happen in Writer, - // Calc etc. - if( mpFrame->mbShown ) - { - mpFrame->CallCallback( SALEVENT_MOVERESIZE, NULL ); - mpFrame->SendPaintEvent(); - } -} - -(void)windowDidMiniaturize: (NSNotification*)pNotification { (void)pNotification; diff --git a/vcl/inc/aqua/salframeview.h b/vcl/inc/aqua/salframeview.h index ece2672f0daa..23874111a220 100644 --- a/vcl/inc/aqua/salframeview.h +++ b/vcl/inc/aqua/salframeview.h @@ -35,8 +35,6 @@ -(void)windowDidChangeScreen: (NSNotification*)pNotification; -(void)windowDidMove: (NSNotification*)pNotification; -(void)windowDidResize: (NSNotification*)pNotification; --(void)windowDidEnterFullScreen: (NSNotification*)pNotification; --(void)windowDidExitFullScreen: (NSNotification*)pNotification; -(void)windowDidMiniaturize: (NSNotification*)pNotification; -(void)windowDidDeminiaturize: (NSNotification*)pNotification; -(BOOL)windowShouldClose: (NSNotification*)pNotification; -- cgit v1.2.3