diff options
author | Patrick Luby <guibmacdev@gmail.com> | 2024-12-14 19:38:03 -0500 |
---|---|---|
committer | Patrick Luby <guibomacdev@gmail.com> | 2024-12-17 20:25:30 +0100 |
commit | 13bdc2ba0cec0cb1c9e8077eb2217f69822a805f (patch) | |
tree | 401aff56c77abde1ba54adf03e9b92fd4a514ff8 /stlport/STLport-4.5.patch | |
parent | b70c6d5e79dde0ef50f83a18afc69703d0dfc712 (diff) |
tdf#161623 Handle windows that macOS forces to native full screen modeHEADmaster
Starting with commit c1452e73091412ba0bb72306329e1912df2ba513, native
full screen was disabled. However, in certain cases, macOS will force
a window into native full screen mode and this caused numerous bugs.
So add the following fixes to support native full screen windows. Note:
the green titlebar button will still zoom the window. That button will
only escape native full screen mode only when macOS has already forced
a window into native full screen mode:
- When in native full screen mode, -[NSWindow styleMask] will include
NSWindowStyleMaskFullScreen which can affect the frame and content
rectangle calculations so always use -[NSWindow styleMask] instead
of the mask that was used to create the window when doing such
calculations.
- A comment in commit c1452e73091412ba0bb72306329e1912df2ba513 mentions
crashing after ordering out a native full screen window. I have not
experienced any crashing, but I did find that ordering out would
leave the application in a state where there is no Desktop and both
the menubar and the Dock are hidden. The fix, which is to close
windows instead of ordering them out, was copied from the following
NeoOffice source code file which is licensed under the Mozilla Public
License, v. 2.0:
https://github.com/neooffice/NeoOffice/blob/NeoOffice-2022_7/vcl/java/source/window/salframe.mm
- In AquaSalFrame::GetWindowState(), add both the original and the
curent frame when the window is in LibreOffice and/or native full
screen mode.
- Track LibreOffice and native full screen state in separate instance
variables so that both modes can be activated independently and the
window is not set back to its original size unitl a window has exited
both full screen modes.
LibreOffice also has its own full screen mode which hides the menubar
and Dock, resizes to fill the screen, and hides all of its toolbars.
As much as possible, both full screen modes should coexist and the
user can enter or exit LibreOffice full screen mode while in native
full screen mode. So add the following fixes for LibreOffice full
screen mode:
- Do not add the window's titlebar height to the window's frame as
that will cause the titlebar to be pushed offscreen.
- The menubar and Dock are both hidden when a window enters LibreOffice
full screen mode. However, -[NSWindow setFrame:display:] shrinks the
window frame to allow room for the menubar if the window is on the
main screen. So, force the return value to match the frame that
LibreOffice expects.
- Multiple windows can be in LibreOffice full screen mode at the
same time so hide or show the menubar and Dock when a LibreOffice
full screen window gains or loses focus.
- When a window is in LibreOffice full screen mode, LibreOffice hides
the menubar. However, when in native full screen mode, hiding the
menubar causes the window's titlebar to either fail to display or
fail to hide when expected. So allow the menubar to remain visible
when a window is in both LibreOffice and native full screen mode
and disable all LibreOffice menus (like is done when a modal windowj
is displayed) to mimic the effect of hiding the menubar.
Change-Id: I94ae24a03d192a681d5500930f7fec70e595ffaf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178497
Reviewed-by: Patrick Luby <guibomacdev@gmail.com>
Tested-by: Jenkins
Diffstat (limited to 'stlport/STLport-4.5.patch')
0 files changed, 0 insertions, 0 deletions