summaryrefslogtreecommitdiff
path: root/framework/inc
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2018-05-23 23:21:21 +0300
committerTor Lillqvist <tml@collabora.com>2018-05-24 15:39:30 +0200
commit4b42fd7e9516fbbd8a92d97680524f32dd260fb2 (patch)
treec2e4035874ca686e9ad4ec044fd744b539759af0 /framework/inc
parent3259f917545abcb8f325c42db3a81e0b9d4ad7fe (diff)
tdf#115284: Unify LibreOffice and system full-screen concepts on macOS
Also tdf#76476, and probably more. Make it so that when a window is in full-screen mode from LibreOffice's point of view, it is also full-screen from the system's point of view, and vice versa. All three ways to enter and leave full-screen mode can now be used with the same end result: The Ctrl-Cmd-F shortcut, the "View > Full Screen" menu entry, and the green bubble on the title bar. Don't disable/deactivate/etc menus while in full-screen mode. The menu auto-hides so there is no harm in having it function normally. Don't display the floating toolbar with a single "Full Screen" button in it as the way to leave full-screen mode. Instead, the same three ways that can be used to enter full-screen mode work to leave it, too. Sadly I could not figure out a way to set a window properly to full-screen at the point where a document window is created and set to be the same size as that kind of document window was the previous time it was open in LibreOffice. Thus don't save state for full-screen windows as we can't properly restore them. At least not for macOS. It is not good to just restore them as non-full-screened but still at the size they had when full-screen. One irritating glitch remains, and I was unable to fix that properly: I now prevent closing the document window that is in full-screen mode. Otherwise, if it is closed, the full-screen mode remains even if no window is open there; the desktop is completely black. Moving the cursor to the top edge, the LibreOffice menu is there, though. I tried to fix that but with no fully satisfying result. (Some attempts even lead to crashes, so just disabling closing is better than crashing at least.) Change-Id: Id909077ef9de9f19d48c8b9ad10d748a65b2417f Reviewed-on: https://gerrit.libreoffice.org/54760 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com>
Diffstat (limited to 'framework/inc')
-rw-r--r--framework/inc/helper/persistentwindowstate.hxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/framework/inc/helper/persistentwindowstate.hxx b/framework/inc/helper/persistentwindowstate.hxx
index e6b5c47d8c72..f9062d4344c4 100644
--- a/framework/inc/helper/persistentwindowstate.hxx
+++ b/framework/inc/helper/persistentwindowstate.hxx
@@ -119,6 +119,8 @@ 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