Description: Hello, on LibreOffice's sidebar, there are a bunch of components that spawn a submenu, these submenus always go down from the menu button, even if the button is at the very bottom of the screen. Steps to Reproduce: 1.Create a table in writer 2.Go to table 3.Open sidbar 4.Go to bottom most button that spawns a menu 5. see as you cannnot see menu as it goes down beyond the edge of the screen Actual Results: Menu cannot be seen nor interracted with due to unclickable items Expected Results: For bottom-most button's menu to go up Reproducible: Always User Profile Reset: No Additional Info: Version: 7.5.0.3 (X86_64) / LibreOffice Community Build ID: c21113d003cd3efa8c53188764377a8272d9d6de CPU threads: 8; OS: Linux 6.2; UI render: default; VCL: gtk3 Locale: id-ID (id_ID.UTF-8); UI: id-ID Flatpak Calc: threaded
Created attachment 185643 [details] Menu that extends down to the edge of the screen
Thank you for the report. I can see this happening in 7.3 already: Version: 7.3.7.2 / LibreOffice Community Build ID: e114eadc50a9ff8d8c8a0567d6da8f454beeb84f CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3 Locale: en-AU (en_AU.UTF-8); UI: en-US Calc: threaded But not in 7.2: Version: 7.2.7.2 / LibreOffice Community Build ID: 8d71d29d553c0f7dcbfa38fbfda25ee34cce99a2 CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3 Locale: en-AU (en_AU.UTF-8); UI: en-US Calc: threaded I think we can call that a regression. This can also be seen in e.g. Draw when all sections of the Properties sidebar deck are expanded with a shape object selected. kf5 and gen VCLs open the dropdowns above the button as expected if there isn't enough space below.
Bibisected with linux-64-7.3 repo to first bad commit faadc0a884c7440df415751320afe5d918a025a3 which points to core commit: commit fae7fd3d193393e4e75ed426b9198925490dc3e4 author Caolán McNamara <caolanm@redhat.com> Fri Nov 19 09:32:55 2021 +0000 committer Caolán McNamara <caolanm@redhat.com> Fri Nov 19 14:57:46 2021 +0100 tree 333516c5e93d2e59ba261b7066a0272f8bcd7231 parent 2337bd5f0d9977a0ecd110abdebea7f331d360df gtk3: default to an explicit constrain-to for Popovers with the intent to do the same replacement with GtkWindow under X11 for gtk3 that we do in MenuButtons for the popover with direct popovers when the constraint is GTK_POPOVER_CONSTRAINT_NONE Change-Id: I629c30b44a9e362ba0d924bb229930b5f0dc7ed3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125540 Caolán, can you please have a look? This makes some functions in the sidebar unavailable, the workaround being using the toolbar or resizing the window.
is it wayland, is it x11?
It's Wayland.
This is one of those blasted wayland+gtk things where its very hard to win. Set no constraints so a popover can leave the window, then the bounds of the monitor are not taken into account like in this case. Set constraints so it cannot leave the window, then in smaller dialogs the popover will be distorted bizarrely to fit into the dialog
format watermark as an example where constraining to be inside the dialog would be sub-optimal. Best I can think of is to detect the toplevel window at popover launch time and constrain inside the parent window for the case that the parent is the application window.
Caolán McNamara committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/11a5ddbb17ddb06c12464f9e961aa9eb42cbf9f9 Resolves: tdf#153885 keep popovers with application window parent inside that It will be available in 7.6.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.
seems a reasonable compromise to me, done in trunk, backport to 7-5 in gerrit
Caolán McNamara committed a patch related to this issue. It has been pushed to "libreoffice-7-5": https://git.libreoffice.org/core/commit/76d95da3d253dca847f78037275c1a29b5516885 Resolves: tdf#153885 keep popovers with application window parent inside that It will be available in 7.5.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.
Fix verified in: Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: 082d009b6a156faa74c9966b0dffc5fa6ce22287 CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3 Locale: en-AU (en_AU.UTF-8); UI: en-US Calc: threaded Tested the sidebar and a few toolbars, with a variety of window sizes. It behaves nicely now. Thank you!