Bug 154470 - Split button dropdown disconnected from toolbar (GTK3, Wayland)
Summary: Split button dropdown disconnected from toolbar (GTK3, Wayland)
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
7.6.0.0 alpha0+
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Caolán McNamara
URL:
Whiteboard: target:7.6.0 target:7.5.3
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Wayland GTK3 Split-Group-Buttons
  Show dependency treegraph
 
Reported: 2023-03-30 09:58 UTC by Stéphane Guillou (stragu)
Modified: 2023-08-01 06:50 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Screencast with commit before the one tagged as regression (2.32 MB, video/webm)
2023-03-30 15:00 UTC, Michael Weghorn
Details
screenshot of issue in 7.6 alpha0+ (44.52 KB, image/png)
2023-04-03 15:29 UTC, Stéphane Guillou (stragu)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stéphane Guillou (stragu) 2023-03-30 09:58:35 UTC
Expanding a split button like Highlight colour or Font colour results in disconnected dropdown.
Both Writer and Calc.

Bibisected with linux-64-7.6 repo to first bad commit 782e6f177343fb51fa40ec8c83f992461ddc1a57 which points to core commit:

commit c379f1b978c3ad4578c130675c1e0a82c70823c0
author	Michael Weghorn <m.weghorn@posteo.de>	Wed Mar 15 17:00:27 2023 +0100
committer	Michael Weghorn <m.weghorn@posteo.de>	Thu Mar 16 06:43:30 2023 +0000
tdf#140762 tdf#152671 Make dock win visible before showing popup
[...]
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148933

Michael, can you please have a look?

Tested with:

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 8e97ef854fb225dac37185c1911894b7d206fa8d
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded
Comment 1 Michael Weghorn 2023-03-30 15:00:18 UTC
Created attachment 186321 [details]
Screencast with commit before the one tagged as regression
Comment 2 Michael Weghorn 2023-03-30 15:06:01 UTC
(In reply to Stéphane Guillou (stragu) from comment #0)
> Expanding a split button like Highlight colour or Font colour results in
> disconnected dropdown.
> Both Writer and Calc.

It's not yet clear to what this means and how to reproduce, can you please clarify the exact steps to reproduce and possibly add a screenshot/screencast?

At least for the "Font Color" and "Character Highlighting" items in the Writer toolbar and sidebar, I don't immediately see a difference between the behavior before and after my commit, but maybe I'm just looking at the wrong place?

What I noticed earlier while testing my commit with gtk3 is that the popup opens a bit too far up (on top of the original toolbar button) when expanding it with the keyboard (space key) after starting LO, while it opens at the correct location when opening using the mouse (or using the keyboard after having it opened using the mouse once), but that turned out to be the case before my commit already, s. attached screencast attachment 186321 [details] with the bibisect repo commit before the one mentioned as commit introducing the regression.

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 80d5d2eb70fd84e98cbe19cd4363d12d50ec31f6
CPU threads: 4; OS: Linux 6.1; UI render: default; VCL: gtk3
Locale: en-GB (en_GB.UTF-8); UI: en-US
Calc: threaded
Comment 3 Stéphane Guillou (stragu) 2023-04-03 15:28:05 UTC
Looks like its Wayland-only. I could not reproduce in X11.
Clicking the dropdown arrow makes it pop up just like shown on my screenshot.

Tested on Ubuntu 20.04 with GNOME 3.36.8 with a master build from today.
Comment 4 Stéphane Guillou (stragu) 2023-04-03 15:29:57 UTC
Created attachment 186445 [details]
screenshot of issue in 7.6 alpha0+

(In reply to Stéphane Guillou (stragu) from comment #3)
> [...] on my screenshot.

... which I realise I never attached to the report, sorry!
Comment 5 Michael Weghorn 2023-04-06 11:47:10 UTC
(In reply to Stéphane Guillou (stragu) from comment #3)
> Looks like its Wayland-only. I could not reproduce in X11.
> Clicking the dropdown arrow makes it pop up just like shown on my screenshot.

Thanks, I can reproduce on Wayland. The problem is that trying to set the proper position fails there for gtk3.

https://gerrit.libreoffice.org/c/core/+/150100 is one potential approach to make that work with gtk3 on Wayland again.
Comment 6 Commit Notification 2023-04-07 08:13:33 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/70642bb7afd2cee6f7ae6eff2936a35978bd0597

tdf#154470 try moving the Show of the client to after the float positioning

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.
Comment 7 Caolán McNamara 2023-04-07 08:17:10 UTC
This apparently works to retain the a11y improvement and avoid the problems with attempting to move windows under wayland. Done in trunk, there was a backport to 7-5 so this fix is in gerrit for 7-5 too.
Comment 8 Commit Notification 2023-04-07 09:23:47 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-7-5":

https://git.libreoffice.org/core/commit/57c2209dd04abfda90e0aba782bc174243633ec9

tdf#154470 try moving the Show of the client to after the float positioning

It will be available in 7.5.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 9 Michael Weghorn 2023-04-07 10:47:54 UTC
Fix verified. Thanks, Caolán!
Comment 10 Stéphane Guillou (stragu) 2023-04-08 10:11:53 UTC
Yes, all good now in:

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: ad5756f0529a80fbb537979bcfd9de7a83a69805
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

Thanks Caolán!