Skip to content

Commit

Permalink
Un-mix up the deltaX and deltaY.
Browse files Browse the repository at this point in the history
  • Loading branch information
octalmage committed Apr 16, 2016
1 parent 9e3a067 commit 1cf70f1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/mouse.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,11 @@ void moveMouse(MMPoint point)
CGPoint mouse = CGEventGetLocation(get);

// Calculate the deltas.
int64_t deltaX = point.x - mouse.x;
int64_t deltaY = point.y -mouse.y;
int64_t deltaX = point.x - mouse.x;
int64_t deltaY = point.y - mouse.y;

CGEventSetIntegerValueField(move, kCGMouseEventDeltaY, deltaX);
CGEventSetIntegerValueField(move, kCGMouseEventDeltaX, deltaY);
CGEventSetIntegerValueField(move, kCGMouseEventDeltaX, deltaX);
CGEventSetIntegerValueField(move, kCGMouseEventDeltaY, deltaY);

CGEventPost(kCGSessionEventTap, move);
CFRelease(get);
Expand Down

0 comments on commit 1cf70f1

Please sign in to comment.