mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-28 22:53:09 +00:00
use EventGenerator in order to not eat half events
This commit is contained in:
parent
5a9aa3c440
commit
565dbc963c
1 changed files with 8 additions and 0 deletions
|
|
@ -39,6 +39,10 @@ MouseEventListener {
|
|||
property int oldMouseX
|
||||
property int oldMouseY
|
||||
|
||||
EventGenerator {
|
||||
id: eventGenerator
|
||||
}
|
||||
|
||||
SequentialAnimation {
|
||||
id: removeAnim
|
||||
property Item target
|
||||
|
|
@ -68,6 +72,10 @@ MouseEventListener {
|
|||
var pos = mapToItem(appletsLayout, mouse.x, mouse.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) {
|
||||
draggingApplet.animationsEnabled = false;
|
||||
dndSpacer.height = draggingApplet.height;
|
||||
|
|
|
|||
Loading…
Reference in a new issue