Bugzilla – Attachment 51649 Details for
Bug 39983
[Feature Request] Support Mac OSX 10.7 (Lion) full-screen mode
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
First patch
fullscreen.libs-gui.1.diff (text/plain), 3.72 KB, created by
Don't use this account, use tml@iki.fi
on 2011-09-27 00:18:16 UTC
(
hide
)
Description:
First patch
Filename:
MIME Type:
Creator:
Don't use this account, use tml@iki.fi
Created:
2011-09-27 00:18:16 UTC
Size:
3.72 KB
patch
obsolete
>commit 7bbba58f316f50713b305d2a8a4530295c0af63e >Author: Tor Lillqvist <tml@iki.fi> >Date: Fri Jul 29 14:21:41 2011 +0300 > > Initial attempt at 10.7 Full-Screen feature support > >diff --git a/vcl/aqua/source/window/salframe.cxx b/vcl/aqua/source/window/salframe.cxx >index f6bcdc9..6dc352b 100644 >--- a/vcl/aqua/source/window/salframe.cxx >+++ b/vcl/aqua/source/window/salframe.cxx >@@ -54,6 +54,7 @@ > // needed for theming > // FIXME: move theming code to salnativewidgets.cxx > #include <Carbon/Carbon.h> >+#include <objc/objc-runtime.h> > #include "postmac.h" > > >@@ -207,6 +208,31 @@ void AquaSalFrame::initWindowAndView() > return; > } > >+ // On 10.7 and later, If the window has a title bar and is >+ // resizable, we make it full-screenable. The ideal would be to do >+ // it only for document windows, but how to figure out that? >+ if (GetSalData()->mnSystemVersion >= 0x1070) { >+ if ((mnStyleMask & NSTitledWindowMask) && (mnStyleMask & NSResizableWindowMask)) { >+ >+ // If compiled against a SDK version earlier than 10.7 >+ // NSWindowCollectionBehaviorFullScreenPrimary won't be >+ // defined so define it ourselves. Note that we can't use >+ // MAC_OS_X_VERSION_10_7 in this #if as such a macro is >+ // not defined in earlier SDKs... >+ >+#if MAC_OS_X_VERSION_MAX_ALLOWED < 1070 >+ enum { >+ NSWindowCollectionBehaviorFullScreenPrimary = (1 << 7) >+ }; >+#endif >+ >+ int behavior = (int) objc_msgSend(mpWindow, @selector(collectionBehavior)); >+ behavior |= NSWindowCollectionBehaviorFullScreenPrimary; >+ >+ objc_msgSend(mpWindow, @selector(setCollectionBehavior:), behavior); >+ } >+ } >+ > if( (mnStyle & SAL_FRAME_STYLE_TOOLTIP) ) > [mpWindow setIgnoresMouseEvents: YES]; > else >@@ -742,6 +768,20 @@ void AquaSalFrame::ShowFullScreen( sal_Bool bFullScreen, sal_Int32 nDisplay ) > return; > > mbFullScreen = bFullScreen; >+ >+ if (GetSalData()->mnSystemVersion >= 0x1070) { >+#if MAC_OS_X_VERSION_MAX_ALLOWED < 1070 >+ enum { >+ NSFullScreenWindowMask = (1 << 14) >+ }; >+#endif >+ if ((([mpWindow styleMask] & NSFullScreenWindowMask) == NSFullScreenWindowMask) == mbFullScreen) >+ return; >+ >+ objc_msgSend(mpWindow, @selector(toggleFullScreen:), mpWindow); >+ 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 54ebe80..6acc5ca 100644 >--- a/vcl/aqua/source/window/salframeview.mm >+++ b/vcl/aqua/source/window/salframeview.mm >@@ -284,6 +284,18 @@ static AquaSalFrame* getMouseContainerFrame() > } > } > >+-(void)windowDidEnterFullScreen: (NSNotification*)pNotification >+{ >+ (void)pNotification; >+ YIELD_GUARD; >+} >+ >+-(void)windowDidExitFullScreen: (NSNotification*)pNotification >+{ >+ (void)pNotification; >+ YIELD_GUARD; >+} >+ > -(void)windowDidMiniaturize: (NSNotification*)pNotification > { > (void)pNotification; >diff --git a/vcl/inc/aqua/salframeview.h b/vcl/inc/aqua/salframeview.h >index 6420035..4014009 100644 >--- a/vcl/inc/aqua/salframeview.h >+++ b/vcl/inc/aqua/salframeview.h >@@ -44,6 +44,8 @@ > -(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;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 39983
: 51649 |
51650
|
51651
|
72070
|
83419