mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
gkt drag and drop remove duplicity.
This commit is contained in:
parent
c808759709
commit
253247f6ce
@ -17,14 +17,22 @@ func (manager *DesktopManagerCtx) DropFiles(x int, y int, files []string) {
|
|||||||
go gtk.DragWindow(files)
|
go gtk.DragWindow(files)
|
||||||
|
|
||||||
// TODO: Find a bettter way.
|
// TODO: Find a bettter way.
|
||||||
|
for step := 1; step <= 6; step++ {
|
||||||
time.Sleep(DELAY)
|
time.Sleep(DELAY)
|
||||||
|
|
||||||
|
switch step {
|
||||||
|
case 1:
|
||||||
manager.Move(0, 0)
|
manager.Move(0, 0)
|
||||||
|
case 2:
|
||||||
manager.ButtonDown(1)
|
manager.ButtonDown(1)
|
||||||
|
case 3:
|
||||||
|
fallthrough
|
||||||
|
case 4:
|
||||||
|
fallthrough
|
||||||
|
case 5:
|
||||||
manager.Move(x, y)
|
manager.Move(x, y)
|
||||||
time.Sleep(DELAY)
|
case 6:
|
||||||
manager.Move(x, y)
|
|
||||||
time.Sleep(DELAY)
|
|
||||||
manager.Move(x, y)
|
|
||||||
time.Sleep(DELAY)
|
|
||||||
manager.ButtonUp(1)
|
manager.ButtonUp(1)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user