Skip to content

applets/taskmanager: port away from custom drag handler

Fushan Wen requested to merge work/fuf/return into master

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

Requires plasma-workspace!2290 (merged)

Edited by Fushan Wen

Merge request reports

Loading