DROP_MOVE_REPEAT.

This commit is contained in:
Miroslav Šedivý 2021-01-15 18:00:04 +01:00
parent 3bbe3781c8
commit 80550350a8

View File

@ -7,6 +7,7 @@ import (
) )
const ( const (
DROP_MOVE_REPEAT = 4
DROP_DELAY = 100 * time.Millisecond DROP_DELAY = 100 * time.Millisecond
) )
@ -29,10 +30,11 @@ func (manager *DesktopManagerCtx) DropFiles(x int, y int, files []string) bool {
}) })
drop.Emmiter.Once("begin", func(payload ...interface{}) { drop.Emmiter.Once("begin", func(payload ...interface{}) {
for i := 0; i < DROP_MOVE_REPEAT; i++ {
manager.Move(x, y) manager.Move(x, y)
time.Sleep(DROP_DELAY) time.Sleep(DROP_DELAY)
manager.Move(x, y) }
time.Sleep(DROP_DELAY)
manager.ButtonUp(1) manager.ButtonUp(1)
}) })