Bug 453558

Summary: Floating (detached) Qt toolbar can't be dragged nor re-attached to window
Product: [Plasma] kwin Reporter: Bernie Innocenti <bernie>
Component: wayland-genericAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED UPSTREAM    
Severity: normal CC: eneyxd, kwin-bugs-null, nate, sndream, srevinsaju
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
See Also: https://bugreports.qt.io/browse/QTBUG-87332
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Bernie Innocenti 2022-05-09 01:40:54 UTC
SUMMARY

I ran into this using Okular, but I believe the bug is not Okular specific.

In a Plasma Wayland session, it is possible to drag a Qt toolbar outside the toolbar area, just like in X11. However, when the toolbar detaches and becomes floating, it is no longer possible to drag it or re-attach it to the docking area.

I found this workaround: change the toolbar orientation to left or right to make dock again.

Moreover, the detached state is saved and, upon restart, the floating toolbar is invisible (possibly a separate bug? There's a workaround for this too: toggle the toolbar visibility in the Settings menu and the toolbar will re-appear.

STEPS TO REPRODUCE
1. Open any document in Okular. I used a JPEG image.
2. Right-click on any toolbar to open the context menu
3. Uncheck "Lock Toolbar Positions"
4. Grab a toolbar and drag it outside the docking area
5. Release the toolbar and try grabbing it again 

OBSERVED RESULT
The toolbar can't be dragged any more!

EXPECTED RESULT
It should work just like in X11

SOFTWARE/OS VERSIONS
KDE Plasma Version: 5.24.4
KDE Frameworks Version: 5.91.0
Qt Version: 5.15.3-1.fc36

ADDITIONAL INFORMATION

This is Fedora 36 one week before the official release, but I don't think it matters.
Not sure why Fedora 36 is releasing with KF5 5.91 instead of 5.93... THIS should matter.
Comment 1 Bernie Innocenti 2022-05-09 06:47:43 UTC
I can also reproduce the bug on Arch Linux with everything built from sources (pre-5.26).

(but not bumping to CONFIRMED because I'm the reporter)
Comment 2 Srevin Saju 2022-05-09 08:07:49 UTC
I can reproduce this on Fedora F36, Plasma 5.24.4, Okular 21.12.2. After detaching the toolbar, its not possible to drag them. Also, when clicking on the drag handles, the toolbar disappears and reappears again, but still remains a floating window.
Comment 3 Martin Flöser 2022-05-09 08:33:56 UTC
I fear that this is a bug in Qt and that we in KWin cannot do anything about it.
Comment 4 Nate Graham 2022-05-09 16:18:37 UTC
Indeed, this is an upstream issue in Qt: https://bugreports.qt.io/browse/QTBUG-87332
Comment 5 Christoph Feck 2024-08-01 12:04:50 UTC
*** Bug 488036 has been marked as a duplicate of this bug. ***
Comment 6 Christoph Feck 2024-08-01 12:05:30 UTC
*** Bug 485363 has been marked as a duplicate of this bug. ***