https://bugs.documentfoundation.org/show_bug.cgi?id=98290
--- Comment #23 from Tor Lillqvist <[email protected]> ---
The code in vcl/osx/salframeview.mm that handles dealing with the macOS
full-screen behaviour seems in the -(id)initWithSalFrame: (AquaSalFrame*)pFrame
instance method of the SalFrameWindow class seems a bit confused: It sets the
bool bAllowFullScreen to a value:
> bool bAllowFullScreen = (SalFrameStyleFlags::NONE == (mpFrame->mnStyle &
> (SalFrameStyleFlags::DIALOG | SalFrameStyleFlags::TOOLTIP |
> SalFrameStyleFlags::SYSTEMCHILD | SalFrameStyleFlags::FLOAT |
> SalFrameStyleFlags::TOOLWINDOW | SalFrameStyleFlags::INTRO)));
> bAllowFullScreen &= (SalFrameStyleFlags::NONE == (~mpFrame->mnStyle &
> SalFrameStyleFlags::SIZEABLE));
> bAllowFullScreen &= (mpFrame->mpParent == nullptr);
And then it checks that in an if statement:
> if( bAllowFullScreen && [pNSWindow respondsToSelector:
> setCollectionBehavior])
> {
But inside that if block, where bAllowFullScreen clearly is true, it checks it
again:
> const int bMode= (bAllowFullScreen ?
> NSWindowCollectionBehaviorFullScreenPrimary :
> NSWindowCollectionBehaviorFullScreenAuxiliary);
Doesn't really increase one's confidence in this code (from 2012)...
Anyway, clearly it is by now pointless to do that respondsToSelector dance as
we only support macOS >= 10.9 by now. We can just use the collectionBehavior
property directly. (It as introduced in 10.7.)
Also, it seems that since 10.11 the default is for windows to be
full-screenable (in the macOS sense) by default, and to disallow that, one
needs to set the collectionBehavior property to
NSWindowCollectionBehaviorFullScreenNone . I tried that, and then the green
button turned into one with a plus sign in it, and clicking it
"maximises/unmaximises" the window (the same as double-clicking the title bar).
Probably this is better than having the green button invoke the macOS
full-screen behaviour that LO is not really prepared to handle sanely?
--
You are receiving this mail because:
You are the assignee for the bug._______________________________________________
Libreoffice-bugs mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs