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 /framework | |
parent | Handle <codecvt> deprecation issue with VS2017 (diff) | |
download | core-c1452e73091412ba0bb72306329e1912df2ba513.tar.gz core-c1452e73091412ba0bb72306329e1912df2ba513.zip |
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 'framework')
-rw-r--r-- | framework/inc/helper/persistentwindowstate.hxx | 2 | ||||
-rw-r--r-- | framework/source/dispatch/closedispatcher.cxx | 17 | ||||
-rw-r--r-- | framework/source/helper/persistentwindowstate.cxx | 29 |
3 files changed, 2 insertions, 46 deletions
diff --git a/framework/inc/helper/persistentwindowstate.hxx b/framework/inc/helper/persistentwindowstate.hxx index f9062d4344c4..e6b5c47d8c72 100644 --- a/framework/inc/helper/persistentwindowstate.hxx +++ b/framework/inc/helper/persistentwindowstate.hxx @@ -119,8 +119,6 @@ class PersistentWindowState : public ::cppu::WeakImplHelper< static OUString implst_getWindowStateFromConfig(const css::uno::Reference< css::uno::XComponentContext >& rxContext , const OUString& sModuleName); - static bool implst_isWindowFullScreen(const css::uno::Reference< css::awt::XWindow >& xWindow); - /** @short retrieve the window state from the container window. @param xWindow diff --git a/framework/source/dispatch/closedispatcher.cxx b/framework/source/dispatch/closedispatcher.cxx index 1fc959734168..ed79058194ab 100644 --- a/framework/source/dispatch/closedispatcher.cxx +++ b/framework/source/dispatch/closedispatcher.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. * @@ -38,7 +38,6 @@ #include <vcl/window.hxx> #include <vcl/svapp.hxx> #include <vcl/syswin.hxx> -#include <vcl/wrkwin.hxx> #include <unotools/moduleoptions.hxx> using namespace com::sun::star; @@ -177,20 +176,6 @@ void SAL_CALL CloseDispatcher::dispatchWithNotification(const css::util::URL& return; } -#ifdef MACOSX - // FIXME: In full-screen mode, if we call ShowFullScreenMode(false) here, it leads to a crash - // later, so disallow closing for now. And yes, if we don't allow closing a window that is in - // full-screen mode, the menu entry should be greyed out then, too. But doing that looks - // insanely hard, too. I am so tempted to just abort this and instead just don't even try to - // support the system full-screen mode. - if (m_pSysWindow) - { - WorkWindow *pWorkWindow = dynamic_cast<WorkWindow*>(m_pSysWindow.get()); - if (pWorkWindow && pWorkWindow->IsFullScreenMode()) - return; - } -#endif - if (m_pSysWindow && m_pSysWindow->GetCloseHdl().IsSet()) { // The closing frame has its own close handler. Call it instead. diff --git a/framework/source/helper/persistentwindowstate.cxx b/framework/source/helper/persistentwindowstate.cxx index e20a152a19d2..ecec7f39d63c 100644 --- a/framework/source/helper/persistentwindowstate.cxx +++ b/framework/source/helper/persistentwindowstate.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. * @@ -125,11 +125,6 @@ void SAL_CALL PersistentWindowState::frameAction(const css::frame::FrameActionEv case css::frame::FrameAction_COMPONENT_DETACHING : { - // FIXME: Hack: Don't save state for full-screen windows. We can't properly restore - // them anyway. - if (implst_isWindowFullScreen(xWindow)) - break; - OUString sWindowState = PersistentWindowState::implst_getWindowStateFromWindow(xWindow); PersistentWindowState::implst_setWindowStateOnConfig(xContext, sModuleName, sWindowState); } @@ -204,28 +199,6 @@ void PersistentWindowState::implst_setWindowStateOnConfig( {} } -bool PersistentWindowState::implst_isWindowFullScreen(const css::uno::Reference< css::awt::XWindow >& xWindow) -{ - bool bRetval = false; - - if (xWindow.is()) - { - SolarMutexGuard aSolarGuard; - - VclPtr<vcl::Window> pWindow = VCLUnoHelper::GetWindow(xWindow); - if ( pWindow && pWindow->IsSystemWindow() ) - { - WindowStateData aWSD; - aWSD.SetMask(WindowStateMask::All); - static_cast<SystemWindow*>(pWindow.get())->GetWindowStateData(aWSD); - if (aWSD.GetState() & WindowStateState::FullScreen) - bRetval = true; - } - } - - return bRetval; -} - OUString PersistentWindowState::implst_getWindowStateFromWindow(const css::uno::Reference< css::awt::XWindow >& xWindow) { OUString sWindowState; |