Bug 144407 - New document opens in full screen mode (expected windowed) same as 'source'
Summary: New document opens in full screen mode (expected windowed) same as 'source'
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
5.4.0.3 release
Hardware: All All
: medium minor
Assignee: Caolán McNamara
URL:
Whiteboard: target:25.8.0
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Maximized-Window
  Show dependency treegraph
 
Reported: 2021-09-09 11:56 UTC by Telesto
Modified: 2024-12-09 08:54 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Screencast (3.40 MB, video/mp4)
2021-09-09 11:57 UTC, Telesto
Details
Demonstration of bibisect findings (26.08 MB, video/mp4)
2023-12-11 02:48 UTC, Steven Casey
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2021-09-09 11:56:56 UTC
Description:
New document opens in full screen mode (expected windowed) same as 'source'

Steps to Reproduce:
1. Launch LibreOffice in safe-mode
2. Open Writer
3. Make the window slightly smaller and drag it to the right side
4. Press New document in the toolbar

Actual Results:
New window opens maximized

Expected Results:
Same size window as the main view


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.3.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 05ff3d67d0e2e436406786c949eb7cfca107ba33
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: nl-NL (nl_NL); UI: nl-NL
Calc: CL
Comment 1 Telesto 2021-09-09 11:57:15 UTC
Created attachment 174923 [details]
Screencast
Comment 2 Telesto 2021-09-09 12:01:29 UTC
Also in
Version: 6.0.6.0.0+
Build ID: c30963b8b4bbbe42a24b97aafa161eff9d7ccdd4
CPU threads: 4; OS: Windows 6.3; UI render: default; 
Locale: nl-NL (nl_NL); Calc: group

not in
Versie: 5.3.5.2 
Build ID: 50d9bf2b0a79cdb85a3814b592608037a682059d
CPU-threads: 4; Besturingssysteem:Windows 6.2; UI-render: GL; Layout Engine: new; 
Locale: nl-NL (nl_NL); Calc: CL
Comment 3 Telesto 2021-09-09 12:06:12 UTC
Also in
5.4

Note: issue can be seen starting swriter.exe directly (fullscreen). Soffice.exe opens windowed. swriter.exe did open windowed in 5.3
Comment 4 raal 2021-11-21 16:14:57 UTC
I can reproduce with Version: 7.3.0.0.alpha1+ / LibreOffice Community
Build ID: fcad2503ede92b515076f9bb3162855dcc2c575d
CPU threads: 4; OS: Linux 5.11; UI render: default; VCL: gtk3
Locale: cs-CZ (cs_CZ.UTF-8); UI: en-US
Calc: threaded
and with Version 4.1.0.0.alpha0+ (Build ID: efca6f15609322f62a35619619a6d5fe5c9bd5a)

I doesn't see an regression on Linux.
Comment 5 Ezinne 2022-04-28 11:47:18 UTC
I got a window fairly bigger than the main view. (Although not maximized)

Reproducible in:

Version: 7.4.0.0.alpha0+ / LibreOffice Community
Build ID: 5453f75a1e682992f3a725781bb563b8cc76cf1b
CPU threads: 8; OS: Linux 5.13; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 6 Kira Tubo 2023-09-22 01:37:50 UTC
Reproduced in daily master build

Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 36163d269bd8f77a86605e4c5ff5adce17b4c66c
CPU threads: 6; OS: Windows 10.0 Build 22621; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded
Comment 7 Steven Casey 2023-12-11 02:43:58 UTC
I have attempted to bibisect this issue. This bug is also present in the newest version:

Version: 24.2.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: 0ddd9f7e055a0c1ecb120de3e40c3fdb8373e9dc
CPU threads: 32; OS: Windows 10.0 Build 22631; UI render: default; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded

Regression introduced by:
https://git.libreoffice.org/core/+/c910d1dae1a9fcf0591098244debc863dd59618a

commit c910d1dae1a9fcf0591098244debc863dd59618a	[log]
author	Caolán McNamara <caolanm@redhat.com>	Fri Feb 17 16:23:28 2017 +0000
committer	Caolán McNamara <caolanm@redhat.com>	Fri Feb 17 16:23:32 2017 +0000
tree b2fc297ab8533ab533fa8280b31ad68d7b04ee9b
parent 2006ac5ffb879c20155af20d3c1c6dda4324678c [diff]

Adding CC to: Caolán McNamara

bibisected using: win32-5.4 repo

Previous commit opens Writer in a windowed tab, however it is still not at the same size as the main window. Not sure if it matters, but I am using an uncommon aspect ratio of 32:9 (5120x1440p) so that may cause some complications.
Comment 8 Steven Casey 2023-12-11 02:48:52 UTC
Created attachment 191350 [details]
Demonstration of bibisect findings

Screen capture demonstrating findings.
Comment 9 Caolán McNamara 2024-11-24 21:35:37 UTC
I think I could argue that there isn't really a regression here. Before that change calc already always opened by default full-screen size, while writer opened in an arbitrary relatively small size by default and I changed things so that writer opened full-screen size like calc already did.

It's only after a window of a given type is closed that the size is saved for reuse on later launches of that type.

The expressed desire here seems to be that "new document" opens in the same size as the document that option is launched from, but I don't think it ever really did that. Though I suppose we could make it do that.

The button itself is handled by NewToolbarController::execute, and the menu by NewMenuController::itemSelected. Saving the size seems to be done by PersistentWindowState::implst_setWindowStateOnConfig, so maybe trigger that save before launch of this ".uno:AddDirect" might give the sort of results hoped for.
Comment 10 Caolán McNamara 2024-12-08 20:21:08 UTC
https://gerrit.libreoffice.org/c/core/+/178119 for that idea
Comment 11 Commit Notification 2024-12-08 21:07:50 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/e693261fbb96acb52567bd1e36228e93c4622630

tdf#144407 save the current window state on new document

It will be available in 25.8.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.