From 80550350a85e3188b9212fe70f8bc049fa064563 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20=C5=A0ediv=C3=BD?= Date: Fri, 15 Jan 2021 18:00:04 +0100 Subject: [PATCH] DROP_MOVE_REPEAT. --- internal/desktop/drop.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/internal/desktop/drop.go b/internal/desktop/drop.go index 8bbbdbd4..0fe7c8f6 100644 --- a/internal/desktop/drop.go +++ b/internal/desktop/drop.go @@ -7,6 +7,7 @@ import ( ) const ( + DROP_MOVE_REPEAT = 4 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{}) { - manager.Move(x, y) - time.Sleep(DROP_DELAY) - manager.Move(x, y) - time.Sleep(DROP_DELAY) + for i := 0; i < DROP_MOVE_REPEAT; i++ { + manager.Move(x, y) + time.Sleep(DROP_DELAY) + } + manager.ButtonUp(1) })