reset keys before drop.

This commit is contained in:
Miroslav Šedivý 2021-01-25 17:33:29 +01:00
parent 51d061e9aa
commit 0ead4bc8fd

View File

@ -22,6 +22,7 @@ func (manager *DesktopManagerCtx) DropFiles(x int, y int, files []string) bool {
}) })
drop.Emmiter.Once("cursor-enter", func(payload ...interface{}) { drop.Emmiter.Once("cursor-enter", func(payload ...interface{}) {
//nolint
manager.ButtonDown(1) manager.ButtonDown(1)
}) })
@ -35,6 +36,7 @@ func (manager *DesktopManagerCtx) DropFiles(x int, y int, files []string) bool {
time.Sleep(DROP_DELAY) time.Sleep(DROP_DELAY)
} }
//nolint
manager.ButtonUp(1) manager.ButtonUp(1)
}) })
@ -43,6 +45,7 @@ func (manager *DesktopManagerCtx) DropFiles(x int, y int, files []string) bool {
finished <- payload[0].(bool) finished <- payload[0].(bool)
}) })
manager.ResetKeys()
go drop.OpenWindow(files) go drop.OpenWindow(files)
select { select {