Skip to content
Commit 17eb382a authored by Fushan Wen's avatar Fushan Wen
Browse files

applets/taskmanager: port away from custom drag handler

Qt Quick Drag is more reliable compared to the custom drag handler
because Qt Quick Drag will consider some corner conditions, like
cancelling drag when QQuickItem becomes invisible or disabled. Qt Quick
Drag only accepts string data and will unconditionally convert all
mime data in Drag.mimeData to QString, so a workaround is added.

DragHelper becomes a QQuickItem because when the current virtual
dekstop changes, the current dragged task can disappear, so the drag
will fail. The helper item is used to store drag data and actually
perform the drag, so drag can still work after the task item disappears.

TapHandler is added to Task item because `DragHandler` will blocck
MouseArea from receiving left click events, but TapHandler can still
work normally.

See also: https://bugreports.qt.io/browse/QTBUG-71922

BUG: 402376
FIXED-IN: 5.27
parent f4be4d34
Pipeline #259900 passed with stage
in 13 minutes and 12 seconds
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment