Skip to content

Commit 267670f

Browse files
authored
Merge pull request #390 from go-vgo/bitmap-pr
Fixed windows warning and update godoc
2 parents 956dcaf + 39e066c commit 267670f

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

robotgo.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -444,12 +444,14 @@ func Move(x, y int) {
444444
MilliSleep(MouseSleep)
445445
}
446446

447-
// DragMouse drag the mouse to (x, y)
447+
// DragMouse drag the mouse to (x, y),
448+
// It's not valid now, use the DragSmooth()
448449
func DragMouse(x, y int, args ...string) {
449450
Drag(x, y, args...)
450451
}
451452

452-
// Drag drag the mouse to (x, y)
453+
// Drag drag the mouse to (x, y),
454+
// It's not valid now, use the DragSmooth()
453455
func Drag(x, y int, args ...string) {
454456
var button C.MMMouseButton = C.LEFT_BUTTON
455457
cx := C.int32_t(x)
@@ -466,6 +468,7 @@ func Drag(x, y int, args ...string) {
466468
// DragSmooth drag the mouse smooth
467469
func DragSmooth(x, y int, args ...interface{}) {
468470
MouseToggle("down")
471+
MilliSleep(50)
469472
MoveSmooth(x, y, args...)
470473
MouseToggle("up")
471474
}

screen/goScreen.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#include "../base/rgb.h"
1313
#include "screengrab_c.h"
1414
#include "screen_c.h"
15+
#include <stdio.h>
1516
// #include "../MMBitmap_c.h"
1617

1718
void padHex(MMRGBHex color, char* hex){

0 commit comments

Comments
 (0)