Bug 145901 - Autofilter popup shows in invisible position of the desktop (again) on low-resolution display (gtk3)
Summary: Autofilter popup shows in invisible position of the desktop (again) on low-re...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.3.0.0 alpha0+
Hardware: All Linux (All)
: medium normal
Assignee: Caolán McNamara
URL:
Whiteboard: target:7.4.0 target:7.3.0.0.beta2
Keywords: bibisected, bisected, regression
Depends on:
Blocks: AutoFilter
  Show dependency treegraph
 
Reported: 2021-11-26 14:25 UTC by Kevin Suo
Modified: 2021-12-02 21:53 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
autofilter-popup-position.ods (7.76 KB, application/vnd.oasis.opendocument.spreadsheet)
2021-11-26 14:25 UTC, Kevin Suo
Details
full desktop screenshot (115.25 KB, image/png)
2021-11-26 14:27 UTC, Kevin Suo
Details
full desktop screenshot on a 1080p display without changing resolution (140.36 KB, image/png)
2021-11-29 13:35 UTC, Kevin Suo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin Suo 2021-11-26 14:25:12 UTC
Created attachment 176525 [details]
autofilter-popup-position.ods

This problem appeared in bug 130449, was fixed in year 2020, but now it appears again.

Steps to Reproduce:

1. On a laptop, change the display resolution to 1368*768 .
If there is no such option, change it to a similar low resolution.
(On a Gnome desktop linux system, this option is in "Settings > Display > Resolution").

2. Open the attached test document, click on the autofilter.

--> The bottom of the dropdown goes beyond the display area, see attached screenshot.
Comment 1 Kevin Suo 2021-11-26 14:27:01 UTC
Created attachment 176526 [details]
full desktop screenshot
Comment 2 Kevin Suo 2021-11-26 14:29:04 UTC
Version: 7.4.0.0.alpha0+ / LibreOffice Community
Build ID: ddc57169ac8d1de00403dbb09fef5221beaa0f3d
CPU threads: 8; OS: Linux 5.14; UI render: default; VCL: gtk3
Locale: zh-CN (zh_CN.UTF-8); UI: zh-CN
Build Platform: Fedora34@X64, Branch:master, bibisect-linux-64-7.3-CN
Calc: threaded

Fedora 34.

I bibisected to range:

62924b92d673 (fix configmgr --enable-dconf build, 2021-11-23)
bdef11f5337e (configure: default to --with-webdav=curl, 2021-10-11)
c2a581ffc1f4 (tdf#62812 WIN use a compatible DC for font funcs, 2021-11-22)
90db4351138d (Resolves tdf#145801 - Uniform height for sidebar's panel titles, 2021-11-22)
365b3f1f21cc (Crash around help-windows., 2021-11-23)
2acdb3e61765 (tdf#139460 improve autofilter sub-menu interaction under gtk, 2021-11-19)
f5137ed54536 (only call signal_closed from Popdown dtor if it is still open, 2021-11-23)
90ce07f5afcf (Remove unused header file lwpresource.hxx, 2021-11-23)
3bb2507a44ef (do not try to read table cell again on ScRefCellValue::isEmpty(), 2021-11-23)
3f66e00c937f (make a bunch of svl::SharedString functions inline, 2021-11-23)
a884f0596cf4 (Use proper type for OUString length variables, 2021-11-23)
34a0f7023aad (tdf#145538 Use range based for loops in EnhancedShapeDumper.cxx, 2021-11-19)
f47da03b885b (Removed break; after return, 2021-11-22)
172836768460 (avoid only painting to windows in LOK mode, not invalidations, 2021-11-22)
5d01e7472707 (tdf#114441 Convert use of sal_uLong to sal_uInt32, 2021-11-23)
792cd487831b (Add test for INetURLObject::changeScheme, 2021-11-23)
ec1c4c493017 (O[U]String::replaceAt overloads that take string_view, 2021-11-22)
db0f2c29bf3a (tdf#144769 Properly encode file name in error dialog, 2021-11-12)

Bisecting...
Comment 3 Kevin Suo 2021-11-27 00:41:48 UTC
Bisected to:

commit 72f0140dc6772896a9d2a10f5625f899ee1510d8
Author: Caolán McNamara <caolanm@redhat.com>
Date:   Fri Nov 19 11:38:58 2021 +0000

    tdf#139460 improve autofilter sub-menu interaction under gtk
Comment 4 Kevin Suo 2021-11-29 13:35:37 UTC
Created attachment 176570 [details]
full desktop screenshot on a 1080p display without changing resolution

Or, if you use a high-definition display, insert above the header row of the data in the test document to make the header data show in the bottom section of the screen, then click on the autofilter dropdown, see attached screenshot.
Comment 5 Caolán McNamara 2021-11-30 13:59:15 UTC
Under wayland there's really only one good tool in gtk of gdk_window_move_to_rect to do smart positioning but its only for GtkWindow not GtkPopover. On the other hand GtkPopovers solve a different set of problems. There is the option of confining the popover to within its parent window, something which is not desirable for dialogs where the popover is often larger than the dialog, but maybe appealing for this case inside the main document
Comment 6 Commit Notification 2021-11-30 16:02:06 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/9944abbba3d70874d4a8051ac99566510f3facaf

tdf#145901 constrain gtk autofilter within calc window

It will be available in 7.4.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 7 Caolán McNamara 2021-11-30 16:10:56 UTC
backport to 7-3 in gerrit. There are no perfect solutions under wayland with gtk3 thatI see, but this should solve the described problem.
Comment 8 Commit Notification 2021-11-30 17:16:05 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-7-3":

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

tdf#145901 constrain gtk autofilter within calc window

It will be available in 7.3.0.0.beta2.

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 9 Kevin Suo 2021-12-01 11:24:50 UTC
Verified fixed.
Comment 10 Commit Notification 2021-12-02 21:47:25 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-7-3":

https://git.libreoffice.org/core/commit/3b83f9398893477ad7b45fc4076403b3583aab56

Related: tdf#145901 use x11 popover replacement for all non-menubutton cases

It will be available in 7.3.0.0.beta2.

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-12-02 21:53:39 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/24db04bbe09f19a49733699e42d0e095eb417fed

Related: tdf#145901 use x11 popover replacement for all non-menubutton cases

It will be available in 7.4.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.