Bug 152088 - Navigator (F5) can not be docked/undocked with Ctrl + Shift + F10 shortcut using Wayland
Summary: Navigator (F5) can not be docked/undocked with Ctrl + Shift + F10 shortcut us...
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
6.1.0.3 release
Hardware: All Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Shortcuts-Accelerators Wayland Navigator Panel-Docking
  Show dependency treegraph
 
Reported: 2022-11-17 15:39 UTC by Cor Nouws
Modified: 2024-09-04 14:23 UTC (History)
8 users (show)

See Also:
Crash report or crash signature:


Attachments
Blank left after dragging the Navigator toolbar (68.97 KB, image/png)
2022-11-17 22:19 UTC, LeroyG
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Cor Nouws 2022-11-17 15:39:08 UTC
- Writer file
- open Navigator if needed F5
  .. Navigator flows/or is docked
- click on Navigator toolbar
- Ctrl+Shft+F10
  > Navigator should be docked at the right side/or be floating
  > it isn't

- if floating: drag the to the left
  > with mouse hovering the left side of the documents window, it shoud get docked..

  > it isn't

Noticed in:
Version: 7.5.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: a81e957f5026373f3935390c786c21416fc74fcc
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded

and an earlier 750 master and in 74...

Is OK in older versions..
Comment 1 Cor Nouws 2022-11-17 15:49:18 UTC
Specification for the OS: Ubuntu 22.04.01 LTS
Comment 2 V Stuart Foote 2022-11-17 16:00:50 UTC
Can not confirm.

Continues to dock w/frame drag, <Ctrl>+2x mouse click, or with <Ctrl><Shift><F10> with recent master against 7.5  without issue on Windows builds.  

wayland compositor on Linux only as Maxim notes in bug 113330, and bug 113416#c2

Version: 7.5.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 55cd20e6228a06836285c14ca6726adb1bb4ffcb
CPU threads: 8; OS: Windows 10.0 Build 19044; UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded
Comment 3 V Stuart Foote 2022-11-17 16:01:54 UTC

*** This bug has been marked as a duplicate of bug 113330 ***
Comment 4 Cor Nouws 2022-11-17 16:35:43 UTC
(In reply to Cor Nouws from comment #1)
> Specification for the OS: Ubuntu 22.04.01 LTS
And Wayland..(In reply to V Stuart Foote from comment #3)
> 
> *** This bug has been marked as a duplicate of bug 113330 ***

Hi Stuart,
Thanks for looking at the bug.

On the same computer, versions prior to 
Version: 6.2.0.0.alpha1+
Build ID: b8e260a9372de9ee1186e1f78ade29717e9b8026
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3; 
TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:master, Time: 2018-10-29_17:17:42
Locale: en-US (en_US.UTF-8); Calc: threaded
do not have the issue.

So it is not solely a Wayland issue, IMO.
Comment 5 Jean-Baptiste Faure 2022-11-17 20:44:31 UTC
Same problem for me with LO 7.4.4.0.0+ and LO 7.5.0.0.alpha+ on Ubuntu 20.04 with Gnome & Wayland.
Same problem with Ubuntu 6.4.7 provided by Ubuntu.

Best regards. JBF
Comment 6 Jean-Baptiste Faure 2022-11-17 20:55:32 UTC
No problem with Xorg gnome session.

Best regards. JBF
Comment 7 LeroyG 2022-11-17 22:19:45 UTC
Created attachment 183652 [details]
Blank left after dragging the Navigator toolbar

With F5 the Navigator appear at the left side.

Ctrl+Shft+F10 does nothing. I can't make it to float by dragging.

If docked to the top/right/bottom by dragging, in the left side there remains a blank space (see screenshot). Pressing F5 twice, the Navigator reappear at the left side.

Version: 7.3.6.2 / LibreOffice Community
Build ID: 30(Build:2)
CPU threads: 1; OS: Linux 5.14; UI render: default; VCL: gtk3
Locale: es-MX (en_US.UTF-8); UI: en-US
Calc: threaded
Supplied by SUSE.
Comment 8 Aron Budea 2022-11-18 03:35:27 UTC
(In reply to Cor Nouws from comment #4)
> On the same computer, versions prior to 
> Version: 6.2.0.0.alpha1+
> Build ID: b8e260a9372de9ee1186e1f78ade29717e9b8026
> CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3; 
> TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:master, Time:
> 2018-10-29_17:17:42
> Locale: en-US (en_US.UTF-8); Calc: threaded
> do not have the issue.
> 
> So it is not solely a Wayland issue, IMO.
Well, I checked with commit preceding that in the 6.2 bibisect repo, and the bug still occurs, so there are versions prior that that still have the bug.

This is the commit that introduced the bug in 6.1, bibisected using repo bibisect-linux-64-6.1:

https://cgit.freedesktop.org/libreoffice/core/commit/?id=e223e70f5d92e2ed027fc5d449bd790a123acdc2
author		Maxim Monastirsky <momonasmon@gmail.com>	2018-06-11 02:08:54 +0300
committer	Maxim Monastirsky <momonasmon@gmail.com>	2018-06-26 12:00:11 +0200

"tdf#117175 wayland: Make popup windows not show off-screen"

...which is the backport of three commits from 6.2:
https://cgit.freedesktop.org/libreoffice/core/commit/?id=0da89ede1fee3a9079b7b41ee8b34504ddeb5ee5
https://cgit.freedesktop.org/libreoffice/core/commit/?id=2bfc4cefc21ab18e9ff7cc5fdc743bcc856d103c
https://cgit.freedesktop.org/libreoffice/core/commit/?id=eb84dcb9c0a202f4917169acdce50775778b72ec

Interestingly, in the 6.2 Linux bibisect repo the result is the following commit, which is obviously wrong, as it's dealing with IWYU stuff:
https://cgit.freedesktop.org/libreoffice/core/commit/?id=f4dafe050abe42a36ed56576c23539eb808db5ba

Maxim, in your opinion, is this a regression, or originates from a general problem with Wayland?
Comment 9 Heiko Tietze 2022-11-18 06:53:44 UTC
(In reply to V Stuart Foote from comment #2)
> Continues to dock w/frame drag, 
Never worked for me
> <Ctrl>+2x mouse click, or with <Ctrl><Shift><F10>
Both work well

// loginctl show-session 1 -p Type: Type=x11

Version: 7.4.2.3 / LibreOffice Community
Build ID: 40(Build:3)
CPU threads: 8; OS: Linux 6.0; UI render: default; VCL: kf5 (cairo+xcb)
Locale: de-DE (en_US.UTF-8); UI: en-US
7.4.2-2
Calc: threaded
Comment 10 Maxim Monastirsky 2022-11-18 09:16:10 UTC
(In reply to Cor Nouws from comment #0)
> - click on Navigator toolbar
> - Ctrl+Shft+F10
>   > Navigator should be docked at the right side/or be floating
>   > it isn't
The keyboard shortcut (as well as double clicking) for docking/undocking is disabled under Wayland for a long time already. I believe ever since https://cgit.freedesktop.org/libreoffice/core/commit/?id=a6d324f30bd5cfd09d54614d8df67b7857550429.

(In reply to Aron Budea from comment #8)
> This is the commit that introduced the bug in 6.1, bibisected using repo
> bibisect-linux-64-6.1:
> 
> https://cgit.freedesktop.org/libreoffice/core/commit/
> ?id=e223e70f5d92e2ed027fc5d449bd790a123acdc2
I assume this is about docking the window by dragging? This is a very odd result, for two reasons:

1. This simply can't work under Wayland, as Wayland doesn't have global coordinates (at least this was the case when I looked at it, few years ago), so there is no way to detect that a window is dragged on top of some area in a different window (unless the dragged window is a subsurface, or the whole docking-by-dragging mechanism is completely replaced with a dnd).

2. The code in the referenced commit is triggered by FloatingWindow::StartPopupMode, which should never be called for the navigator window. Also, locally reverting that change doesn't have any effect on this issue (as I expected).

Are you sure that the bibisect builds prior to that commit indeed started with a gtk3 interface?
Comment 11 Aron Budea 2022-11-18 10:11:08 UTC
(In reply to Maxim Monastirsky from comment #10)
> (In reply to Cor Nouws from comment #0)
> > - click on Navigator toolbar
> > - Ctrl+Shft+F10
> >   > Navigator should be docked at the right side/or be floating
> >   > it isn't
> The keyboard shortcut (as well as double clicking) for docking/undocking is
> disabled under Wayland for a long time already. I believe ever since
> https://cgit.freedesktop.org/libreoffice/core/commit/
> ?id=a6d324f30bd5cfd09d54614d8df67b7857550429.
Ctrl+Shft+F10 worked for docking the window prior to the commits I listed in comment 8 (not the three individual ones, but the one identified in 6.1, and the other in 6.2).

> Are you sure that the bibisect builds prior to that commit indeed started
> with a gtk3 interface?
It does say so in the About box. They've had gtk3 ever since 5.2.
Comment 12 Maxim Monastirsky 2022-11-18 12:05:26 UTC
(In reply to Aron Budea from comment #11)
> Ctrl+Shft+F10 worked for docking the window prior to the commits I listed in
> comment 8 (not the three individual ones, but the one identified in 6.1, and
> the other in 6.2).
I don't understand how this could be the case. Could you verify that the LO window is indeed a Wayland window? For gnome shell you can do:

1. Alt+F2, type 'lg', and press Enter.
2. Switch to the Windows tab.
3. In the list find the line with LO's window title, and click on that line.
4. In the opened popup - the first line should have "GType: MetaWindowWayland". If it's "GType: MetaWindowXwayland", then it's x11 not Wayland.

The only other explanation I could think of, is that maybe the machine that used to build the bibisect repo had a system update prior to that build, and that update included changes to the gtk3 headers, which somehow resulted with a different compilation path. That might explain also the weird result of 6.2, as it was more or less in the same time frame (difference of 2 days). Other than that, I'm out of ideas.
Comment 13 Aron Budea 2022-11-18 12:28:18 UTC
(In reply to Maxim Monastirsky from comment #12)
> I don't understand how this could be the case. Could you verify that the LO
> window is indeed a Wayland window? For gnome shell you can do:
> 
> 1. Alt+F2, type 'lg', and press Enter.
> 2. Switch to the Windows tab.
> 3. In the list find the line with LO's window title, and click on that line.
> 4. In the opened popup - the first line should have "GType:
> MetaWindowWayland". If it's "GType: MetaWindowXwayland", then it's x11 not
> Wayland.
Thanks for the instructions! I went back to efa4341364d6e3bd4ff86cb09be39acc3564ccdf~1 in the 6.1 bibisect repo (which corresponds to e223e70f5d92e2ed027fc5d449bd790a123acdc2~1 in the source repo), ran soffice, confirmed that Ctrl+Shft+F10 works from the Navigator window, and when performing the steps above, I see: "GType: MetaWindowWayland", not "MetaWindowXwayland".

For the record, out of curiosity I went back to check the latest of the 5.2 bibisect repo, and it shows "GType: MetaWindowWayland" there as well.
Comment 14 Stéphane Guillou (stragu) 2023-01-11 11:56:33 UTC
I am using Ubuntu 20.04 with GNOME 3.36.8 and Wayland. To check if the window was indeed a Wayland window, I used Maxim's steps in comment 12. None of these tested versions allow me to drag-and-drop the navigator to dock it. All were installed from DEBs.

On LO 6.1.0.3, GTK2 is used, window is _not_ a Wayland window. I can dock and undock the Navigator using the shortcut Ctrl + Shift + F10 (when the element is focused) and the Ctrl + double-click method.

Version: 6.1.0.3
Build ID: efb621ed25068d70781dc026f7e9c5187a4decd1
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk2; 
Locale: en-AU (en_AU.UTF-8); Calc: group threaded

In 6.2.0 beta1 and a master build from today, window _is_ a Wayland window. The shortcut does not work, nor does the Ctrl + double-click.

Version: 6.2.0.0.beta1
Build ID: d1b41307be3f8c19fe6f1938cf056e7ff1eb1d18
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3; 
Locale: en-AU (en_AU.UTF-8); UI-Language: en-US
Calc: threaded

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

Curious to know why the older bibisect repos use Wayland in Aron's tests.
Comment 15 Izhar Firdaus 2023-07-16 10:45:13 UTC
Replicatable in Fedora 37 + Wayland, Libreoffice 7.5.4.2, both from Flathub and RPMs
Comment 16 Stéphane Guillou (stragu) 2023-07-17 11:31:50 UTC
(In reply to Aron Budea from comment #13)
> I went back to
> efa4341364d6e3bd4ff86cb09be39acc3564ccdf~1 in the 6.1 bibisect repo (which
> corresponds to e223e70f5d92e2ed027fc5d449bd790a123acdc2~1 in the source
> repo), ran soffice, confirmed that Ctrl+Shft+F10 works from the Navigator
> window, and when performing the steps above, I see: "GType:
> MetaWindowWayland", not "MetaWindowXwayland".

Confirmed with the linux-64-6.1 bibisect repo: it runs with the gtk3 VCL, and it shows up as MetaWindowWayland (whereas installed from debs, it would stick to gtk2 and MetaWindowXwayland).

- Before e223e70f5d92e2ed027fc5d449bd790a123acdc2, gtk3 VCL, Wayland window: Ctrl + Shift + F10 works for docking/undocking the Navigator.
- Since e223e70f5d92e2ed027fc5d449bd790a123acdc2, gtk3 VCL, Wayland window: it doesn't work.

With a MetaWindowXwayland, using gen VCL, shortcut is usable before and after the commit, no change.

So confirming this is a Wayland-specific regression. I clarified the summary to make this only about the loss of shortcut functionality. (Maxim is right that drag-and-dropping never worked for Wayland.)

Maxim, can you please have another look?
Comment 17 Cor Nouws 2024-09-04 14:23:59 UTC
works in Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 8843081f91e206b4749b83b186caaceaf1f8c4e3
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded

no idea about the commit/change causing this>WFM