Commit c1a536a5 authored by Marco Martin's avatar Marco Martin
Browse files

Fix dragging especially by touch

The drag manager of a window now can take over from anything, so that
the events to initiate a drag are not stolen by the tap handlers
(fixes the drag starts only the second time is tried issue)

On wayland drag by touch was completely broken by the supportsclosewindows check,
now the touch drag handler is always active and the check of the property is done only
when the drag is over

BUG:455268
parent 4699f8c0
Pipeline #193217 failed with stage
in 12 minutes and 50 seconds
......@@ -398,7 +398,7 @@ FocusScope {
component DragManager : DragHandler {
id: dragHandler
target: null
grabPermissions: PointerHandler.CanTakeOverFromHandlersOfSameType
grabPermissions: PointerHandler.CanTakeOverFromAnything
readonly property double targetScale: {
if (!heap.supportsDragUpGesture) {
......@@ -433,7 +433,6 @@ FocusScope {
DragManager {
id: touchDragHandler
acceptedDevices: PointerDevice.TouchScreen
enabled: heap.supportsCloseWindows
readonly property double targetOpacity: {
if (!heap.supportsCloseWindows) {
return 1;
......@@ -444,11 +443,8 @@ FocusScope {
}
onActiveChanged: {
if (!heap.supportsCloseWindows) {
return;
}
if (!active) {
if (targetOpacity < 0.4) {
if (heap.supportsCloseWindows && targetOpacity < 0.4) {
thumb.client.closeWindow();
}
}
......
Supports Markdown
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