Bug 470670

Summary: Clicking-and-holding on a desktop widget no longer allows it to be dragged immediately
Product: [Plasma] plasmashell Reporter: Nate Graham <nate>
Component: ContainmentAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED FIXED    
Severity: minor CC: justin.zobel, nicolas.fella, notmart, qydwhotmail
Priority: NOR Keywords: qt6
Version First Reported In: master   
Target Milestone: 1.0   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 6.0
Sentry Crash Report:

Description Nate Graham 2023-06-05 14:19:37 UTC
In Plasma 5, when you click-and-hold on a desktop widget, you can immediately move it by moving the cursor. In Plasma 6, this is no longer the case; the initial click-and-hold enters edit mode, but does not also initiate a drag. You need to  first enter edit mode, then drag it as a separate action.

Using X11; have not tested Wayland yet.
Comment 1 Justin Zobel 2023-06-06 03:05:55 UTC
Confirmed on Wayland as well.
Comment 2 Nicolas Fella 2023-06-13 20:41:26 UTC
Not sure I understand the issue correctly, but this seems to work fine for me (on Wayland)
Comment 3 Nate Graham 2023-06-13 20:52:23 UTC
Steps to reproduce:
1. Put a widget on the desktop via any method
2. Exit edit mode, if you' were still in it as a result of putting a widget on the desktop
3. Click-and-hold on that widget until Plasma enters Edit Mode *and do not release the mouse button*
4. With the mouse button still held down, start moving the cursor somewhere

Expected results:
The widget moves with the cursor

Actual results
The widget does not move with the cursor
Comment 4 Nicolas Fella 2023-06-13 20:53:36 UTC
That works fine here
Comment 5 Nicolas Fella 2023-06-13 20:55:57 UTC
Actually, it works fine *for unconfigured widgets*, like media frame or weather right after placing. It does not work fine for e.g. analog clock
Comment 6 Nate Graham 2023-06-13 21:00:41 UTC
Fascinating. I was indeed testing with Analog Clock.
Comment 7 Fushan Wen 2023-09-28 11:00:05 UTC
localhost.localdomain plasmashell[1806]: cannot grab mouse: no event is currently being delivered
Comment 8 Bug Janitor Service 2023-09-28 11:32:06 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/3343
Comment 9 Fushan Wen 2023-09-28 14:08:46 UTC
Git commit ec009aafd012c57be1521eca3ebf4aa7bf859c7e by Fushan Wen.
Committed on 28/09/2023 at 15:59.
Pushed by fusionfuture into branch 'master'.

ItemContainer: port away from deprecated QQuickItem::(un)grabMouse

It's deprecated and no longer works without an ongoing mouse event.

See also https://invent.kde.org/qt/qt/qtdeclarative/-/blob/251fdf01a65a52414dd9183308520efbbd731567/src/quick/items/qquickitem.cpp?page=9#L8285
FIXED-IN: 6.0

M  +11   -6    components/containmentlayoutmanager/itemcontainer.cpp

https://invent.kde.org/plasma/plasma-workspace/-/commit/ec009aafd012c57be1521eca3ebf4aa7bf859c7e