diff options
author | Tor Lillqvist <tml@collabora.com> | 2018-05-30 11:37:19 +0300 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2018-05-30 13:50:15 +0200 |
commit | c1452e73091412ba0bb72306329e1912df2ba513 (patch) | |
tree | e37191be44f42cdd46c6e0cd39d14a4ebb7468b6 /sfx2 | |
parent | 3cce079c9307315f18b6f49f1de58f52e956e0d6 (diff) |
tdf#117872: Revert "tdf#115284: Unify LibreOffice and system full-screen..."
Instead, never participate in the macOS system full-screen mode. There
is just too much complexity involved, and the way LibreOffice works
really isn't prepared for the concept of windows having the option
from a system point of view to being full-screenable or not.
This means that the green bubble in window title bars changes from
being a (system) full-screen toggle to being a maximize/restore
toggle. Sure, the "maximize" concept also probably can be confused
with LibreOffice's own full-screen concept.
For instance, the Start Centre window is not expecting to be made
full-screen. Still, when you from the Start Centre open a Writer
document, it is the *same* window that is re-used as the Writer
window, and then suddenly should be prepared to handle going
full-screen.
Also, it is up to each separate kind of document window whether it can
be made full-screen (from the LibreOffice point of view) or not.
Writer windows can, but Impress windows can't, for example. The
View>Full Screen menu entry is added separately each case.
Maybe I will come back to this mess later, or not. Anybody else is
welcome to have a go, too, of course.
This reverts commit 4b42fd7e9516fbbd8a92d97680524f32dd260fb2.
Change-Id: I6983481cbd30c0e5190c450483b1246006c80632
Reviewed-on: https://gerrit.libreoffice.org/55049
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/view/viewfrm.cxx | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx index 5221205801ea..8fe2079492c5 100644 --- a/sfx2/source/view/viewfrm.cxx +++ b/sfx2/source/view/viewfrm.cxx @@ -1,4 +1,4 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * @@ -146,11 +146,7 @@ void SfxViewFrame::InitInterface_Impl() GetStaticInterface()->RegisterChildWindow(SID_BROWSER); GetStaticInterface()->RegisterChildWindow(SID_RECORDING_FLOATWINDOW); #if HAVE_FEATURE_DESKTOP -#ifndef MACOSX - // No floating toolbar to exit full-screen mode on macOS please; there is a system way to do it - // and that is what we want. GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_FULLSCREEN, SfxVisibilityFlags::FullScreen, ToolbarId::FullScreenToolbox); -#endif GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_APPLICATION, SfxVisibilityFlags::Standard, ToolbarId::EnvToolbox); #endif } @@ -2714,10 +2710,7 @@ void SfxViewFrame::MiscExec_Impl( SfxRequest& rReq ) css::uno::Reference< css::frame::XFrame > xFrame( GetFrame().GetFrameInterface(), css::uno::UNO_QUERY); -#ifndef MACOSX - // On macOS we don't deactivate the menu bar in system full-screen mode, which - // is how we implement the LibreOffice full-screen mode. The menu bar auto-hides - // in the full-screen mode. + Reference< css::beans::XPropertySet > xPropSet( xFrame, UNO_QUERY ); Reference< css::frame::XLayoutManager > xLayoutManager; if ( xPropSet.is() ) @@ -2731,11 +2724,10 @@ void SfxViewFrame::MiscExec_Impl( SfxRequest& rReq ) { } } -#endif + bool bNewFullScreenMode = pItem ? pItem->GetValue() : !pWork->IsFullScreenMode(); if ( bNewFullScreenMode != pWork->IsFullScreenMode() ) { -#ifndef MACOSX Reference< css::beans::XPropertySet > xLMPropSet( xLayoutManager, UNO_QUERY ); if ( xLMPropSet.is() ) { @@ -2749,11 +2741,8 @@ void SfxViewFrame::MiscExec_Impl( SfxRequest& rReq ) { } } -#endif pWork->ShowFullScreenMode( bNewFullScreenMode ); -#ifndef MACOSX pWork->SetMenuBarMode( bNewFullScreenMode ? MenuBarMode::Hide : MenuBarMode::Normal ); -#endif GetFrame().GetWorkWindow_Impl()->SetFullScreen_Impl( bNewFullScreenMode ); if ( !pItem ) rReq.AppendItem( SfxBoolItem( SID_WIN_FULLSCREEN, bNewFullScreenMode ) ); |