Bug 1391418

Summary: toolbars can't be easily docked after undocking on wayland
Product: [Fedora] Fedora Reporter: Kamil Páral <kparal>
Component: libreofficeAssignee: Caolan McNamara <caolanm>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 25CC: caolanm, dtardon, erack, fedora, mstahl, sbergman, yuzitemipi
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: libreoffice-5.2.3.3-6.fc25 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-19 21:16:24 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1277927    

Description Kamil Páral 2016-11-03 09:42:44 UTC
Description of problem:
This is a downstream bug to track https://bugzilla.gnome.org/show_bug.cgi?id=768128 .

If you undock a toolbar in Libreoffice (e.g. Writer), you can no longer dock it just by dragging it with a mouse, when using Wayland. The workaround is to use Ctrl+Shift+F10 shortcut (or switch to using X11).

Version-Release number of selected component (if applicable):
gnome-session-wayland-session-3.22.1-2.fc25.x86_64
gnome-shell-3.22.1-2.fc25.x86_64
gtk3-3.22.2-1.fc25.x86_64
libreoffice-core-5.2.3.3-3.fc25.x86_64
libwayland-client-1.12.0-1.fc25.x86_64
libwayland-cursor-1.12.0-1.fc25.x86_64
libwayland-server-1.12.0-1.fc25.x86_64
mesa-libwayland-egl-12.0.3-3.fc25.x86_64
mutter-3.22.1-6.fc25.x86_64
xorg-x11-server-Xwayland-1.19.0-0.3.20161026.fc25.x86_64


How reproducible:
always

Steps to Reproduce:
1. run LO Writer
2. undock a toolbar
3. try to dock it back using the mouse

Comment 1 Caolan McNamara 2016-11-03 12:30:00 UTC
another option is to drop allowing toolbars to float under wayland rather than try to fight against the

Comment 2 Kamil Páral 2016-11-03 13:22:13 UTC
If you can keep the toolbars moveable (because you can currently move them under Wayland, just undocking is problematic), but prohibit them from floating, then that could be a good temporary solution, yes.

Comment 3 Fedora Update System 2016-11-11 08:59:32 UTC
libreoffice-5.2.3.3-6.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2016-0438bf95e5

Comment 4 Kamil Páral 2016-11-11 11:19:14 UTC
Undocking is now disallowed, which solves this problem in a way.

Comment 5 Fedora Update System 2016-11-11 16:58:27 UTC
libreoffice-5.2.3.3-6.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-0438bf95e5

Comment 6 Fedora Update System 2016-11-19 21:16:24 UTC
libreoffice-5.2.3.3-6.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.

Comment 7 Christian Stadelmann 2016-11-20 23:11:56 UTC
(In reply to Kamil Páral from comment #4)
> Undocking is now disallowed, which solves this problem in a way.

That's wrong. You can still undock toolbars – at least from what you can see from toolbar shadows. If you do so, it leaves them in a very broken state either being drawn on behind of another toolbar or cut off. Please undo this change, it was way better before this patch.

Comment 8 Kamil Páral 2016-11-21 13:05:22 UTC
(In reply to Christian Stadelmann from comment #7)
> That's wrong. You can still undock toolbars – at least from what you can see
> from toolbar shadows. If you do so, it leaves them in a very broken state
> either being drawn on behind of another toolbar or cut off.

Can you please share a screencast or at least a reproducer description?

Comment 9 Christian Stadelmann 2016-11-21 15:27:38 UTC
(In reply to Kamil Páral from comment #8)
> (In reply to Christian Stadelmann from comment #7)
> > That's wrong. You can still undock toolbars – at least from what you can see
> > from toolbar shadows. If you do so, it leaves them in a very broken state
> > either being drawn on behind of another toolbar or cut off.
> 
> Can you please share a screencast or at least a reproducer description?

Screencast: Is there any software known to work on wayland? I don't think I have any installed. 

Reproducer:
1. open any Libreoffice component (e.g. writer)
2. drag any toolbar
3. drop it into the text pane (where it would detach before the latest update)

What happens:
While dragging the toolbar shadow indicates that the toolbar will be detached.
After releasing the mouse button, the toolbar is either gone completely or is drawn behind other toolbars or the main content (text or cells or drawing area on Writer / Calc / Draw).

What should happen:
Don't draw a shadow if the toolbar won't be there after drop.
If the toolbar cannot be shown where it was dropped, snap back to its original position but don't put it to some random position.

Comment 10 Christian Stadelmann 2016-11-21 15:43:34 UTC
(In reply to Christian Stadelmann from comment #9)
> Screencast: Is there any software known to work on wayland? I don't think I
> have any installed. 

I've found recordmydesktop which doesn't work on wayland. The gtk UI crashes instead of starting and the CLI version just records a black screen.

Comment 11 Caolan McNamara 2016-11-21 17:18:35 UTC
Open a new bug for the new problem please. You can still drag toolbars to new dockable positions. But if you don't get as far as a new dockable position, then under X we still get a floating toolbar and under wayland its the same response as if you pressed ESC to cancel the drag.

So it sounds like a pre-existing problem with cancelling toolbar docking which in-itself isn't wayland related, though of course that all efforts to float a toolbar are autocanceled under wayland is very related to wayland.

Comment 12 Christian Stadelmann 2016-11-21 19:39:23 UTC
Ok, I'll be creating a new bug report.

Comment 13 Kamil Páral 2016-11-22 11:52:22 UTC
(In reply to Christian Stadelmann from comment #9)
> Screencast: Is there any software known to work on wayland? I don't think I
> have any installed. 

https://help.gnome.org/users/gnome-help/stable/screen-shot-record.html.en
limited to 30 seconds

https://extensions.gnome.org/extension/690/easyscreencast/
what I personally use

Comment 14 Christian Stadelmann 2016-11-22 12:03:49 UTC
(In reply to Kamil Páral from comment #13)
> (In reply to Christian Stadelmann from comment #9)
> > Screencast: Is there any software known to work on wayland? I don't think I
> > have any installed. 
> 
> https://help.gnome.org/users/gnome-help/stable/screen-shot-record.html.en
> limited to 30 seconds
> 
> https://extensions.gnome.org/extension/690/easyscreencast/
> what I personally use

Thanks!
I've reported a new bug report #1397181 for the issue(s) I've described above.