Bug 131031 - F5 navigator in calc opens initially very wide
Summary: F5 navigator in calc opens initially very wide
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: graphics stack (show other bugs)
Version:
(earliest affected)
6.4.1.2 release
Hardware: All All
: medium normal
Assignee: Armin Le Grand
URL:
Whiteboard: target:7.0.0 target:6.4.3 target:6.4....
Keywords: bibisected, bisected, regression
: 131086 (view as bug list)
Depends on:
Blocks: GTK3
  Show dependency treegraph
 
Reported: 2020-02-29 15:43 UTC by Caolán McNamara
Modified: 2021-04-09 09:24 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Caolán McNamara 2020-02-29 15:43:44 UTC
Description:
on first start, pressing F5 in calc results in a very wide floating navigator by default

Steps to Reproduce:
1. delete user config
2. launch calc
3. F5 to launch floating navigator

Actual Results:
starts too wide

Expected Results:
navigator at min size


Reproducible: Always


User Profile Reset: No



Additional Info:
already bisected to...

commit b26ca5b13733b46c2df0787502f885e15b390956
Author: Jan-Marek Glogowski <jan-marek.glogowski@extern.cib.de>
Date:   Thu Feb 20 16:42:09 2020 +0100

    tdf#130841 resize to client size after SetPosSize
    
    This fixes the hack of the native menu bar with a smaller client
    size in relation to the frame geometry.
    Eventually this should be replaced by proper mnTopBorder usage,
    but this currently isn't working.
    
    Change-Id: Ib5825d9c8f77e463fcb086e0373228fe91d8705a
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89202
    Tested-by: Jenkins
    Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Comment 1 Jan-Marek Glogowski 2020-02-29 19:32:58 UTC
I can confirm this with gtk3 on master, not with gen, qt5 or win.

Proposed fix is: https://gerrit.libreoffice.org/c/core/+/89760
Comment 2 Commit Notification 2020-03-02 09:35:21 UTC
Jan-Marek Glogowski committed a patch related to this issue.
It has been pushed to "master":

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

tdf#131031 Gtk3 presume the resize did happen

It will be available in 7.0.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.
Comment 3 Xisco Faulí 2020-03-03 11:19:12 UTC
*** Bug 131086 has been marked as a duplicate of this bug. ***
Comment 4 Commit Notification 2020-03-03 14:26:09 UTC
Jan-Marek Glogowski committed a patch related to this issue.
It has been pushed to "libreoffice-6-4":

https://git.libreoffice.org/core/commit/6f7893895794a4d92b1bd74803684c2ac01cd0fa

tdf#131031 Gtk3 presume the resize did happen

It will be available in 6.4.3.

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.
Comment 5 Xisco Faulí 2020-03-04 11:47:59 UTC
Verified in

Version: 7.0.0.0.alpha0+
Build ID: c57d6d39c80844c9d4c6bfed85cc151e52a67b34
CPU threads: 4; OS: Linux 4.19; UI render: default; VCL: gtk3; 
Locale: en-US (en_US.UTF-8); UI-Language: en-US
Calc: threaded

@Jan-marek, thanks for fixing this issue!
Comment 6 Commit Notification 2020-03-05 15:49:51 UTC
Jan-Marek Glogowski committed a patch related to this issue.
It has been pushed to "libreoffice-6-4-2":

https://git.libreoffice.org/core/commit/709afdef338d8ea8ce5d53d82de5828f5f4484e0

tdf#131031 Gtk3 presume the resize did happen

It will be available in 6.4.2.

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.
Comment 7 Armin Le Grand 2021-03-17 09:29:24 UTC
Need to reopen, this fix killed tdf#130841. Will add a note there, too. Will then look for alternative methods to fix this task.
Comment 8 Armin Le Grand 2021-03-17 17:36:17 UTC
Just setting maGeometry.nWidth/nHeight will delete the evtl. implicitely existing space at top for the gtk native MenuBar, will make the Window too big and the StatusBar at the bottom vanish and thus breaks the fix in tdf#130841.
Unfortunately that MenuBar is not 'officially' supported to get values from it or I did not find it (Height would be of interest here), but evtl. reserved space for it is 'hidden' in the difference between size from get_size and the current setting in maGeometry.nWidth/nHeight, so it is possible (and necessary) to 'save' these values and re-apply them.
Note: There is also SalFrameGeometry::n(Top|*)Decoration which is indeed used (checked in debugger) and I tried to use it, but the numerical value is not correct for this purpose (but too big by about 30%)
Comment 9 Armin Le Grand 2021-03-17 17:37:04 UTC
1st version on gerrit, see https://gerrit.libreoffice.org/c/core/+/112654
Comment 10 Commit Notification 2021-03-19 18:15:42 UTC
Armin Le Grand (Allotropia) committed a patch related to this issue.
It has been pushed to "master":

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

tdf#131031 take MenuBar into account on size change

It will be available in 7.2.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.
Comment 11 Commit Notification 2021-03-21 01:38:13 UTC
Armin Le Grand (Allotropia) committed a patch related to this issue.
It has been pushed to "libreoffice-7-1":

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

tdf#131031 take MenuBar into account on size change

It will be available in 7.1.3.

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.