Commit 565dbc96 authored by Marco Martin's avatar Marco Martin

use EventGenerator in order to not eat half events

parent 5a9aa3c4
...@@ -39,6 +39,10 @@ MouseEventListener { ...@@ -39,6 +39,10 @@ MouseEventListener {
property int oldMouseX property int oldMouseX
property int oldMouseY property int oldMouseY
EventGenerator {
id: eventGenerator
}
SequentialAnimation { SequentialAnimation {
id: removeAnim id: removeAnim
property Item target property Item target
...@@ -68,6 +72,10 @@ MouseEventListener { ...@@ -68,6 +72,10 @@ MouseEventListener {
var pos = mapToItem(appletsLayout, mouse.x, mouse.y); var pos = mapToItem(appletsLayout, mouse.x, mouse.y);
draggingApplet = appletsSpace.layout.childAt(pos.x, pos.y); draggingApplet = appletsSpace.layout.childAt(pos.x, pos.y);
eventGenerator.sendGrabEvent(draggingApplet, EventGenerator.UngrabMouse);
eventGenerator.sendGrabEvent(headerItem, EventGenerator.GrabMouse);
eventGenerator.sendMouseEvent(headerItem, EventGenerator.MouseButtonPress, mouse.x, mouse.y, Qt.LeftButton, Qt.LeftButton, 0)
if (draggingApplet) { if (draggingApplet) {
draggingApplet.animationsEnabled = false; draggingApplet.animationsEnabled = false;
dndSpacer.height = draggingApplet.height; dndSpacer.height = draggingApplet.height;
......
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