Commit bab5d7d9 authored by Marco Martin's avatar Marco Martin

set startMouseX/Y on pressandHold, not pressed

parent 565dbc96
......@@ -60,10 +60,6 @@ MouseEventListener {
}
onPressed: {
startMouseX = mouse.screenX;
startMouseY = mouse.screenY;
oldMouseX = mouse.screenX;
oldMouseY = mouse.screenY;
}
onPressAndHold: {
print(favoritesView.contains(mapToItem(favoritesView, mouse.x, mouse.y)))
......@@ -72,6 +68,11 @@ MouseEventListener {
var pos = mapToItem(appletsLayout, mouse.x, mouse.y);
draggingApplet = appletsSpace.layout.childAt(pos.x, pos.y);
startMouseX = mouse.screenX;
startMouseY = mouse.screenY;
oldMouseX = mouse.screenX;
oldMouseY = mouse.screenY;
eventGenerator.sendGrabEvent(draggingApplet, EventGenerator.UngrabMouse);
eventGenerator.sendGrabEvent(headerItem, EventGenerator.GrabMouse);
eventGenerator.sendMouseEvent(headerItem, EventGenerator.MouseButtonPress, mouse.x, mouse.y, Qt.LeftButton, Qt.LeftButton, 0)
......
Markdown is supported
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