Skip to content

Commit

Permalink
-r handles negative coords correctly (fixes #119)
Browse files Browse the repository at this point in the history
  • Loading branch information
BlueM committed Aug 7, 2021
1 parent 4eb0a99 commit 79a49ff
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion cliclick.m
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,9 @@ int main (int argc, const char * argv[]) {
}

if (restoreOption) {
NSString *positionString = [NSString stringWithFormat:@"%d,%d", (int)initialMousePosition.x, (int)initialMousePosition.y];
// Note: we have to prefix the coordinates with "=" to ensure they are not interpreted
// as relative values, see https://github.com/BlueM/cliclick/issues/119
NSString *positionString = [NSString stringWithFormat:@"=%d,=%d", (int)initialMousePosition.x, (int)initialMousePosition.y];
id moveAction = [[MoveAction alloc] init];
[moveAction performActionWithData:positionString
withOptions:executionOptions];
Expand Down
4 changes: 2 additions & 2 deletions cliclick_Prefix.pch
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
#endif

// Version or branch
#define VERSION @"5.0"
#define VERSION @"5.0.1"

// Date as m/d/Y
#define RELEASEDATE @"2021-02-27"
#define RELEASEDATE @"2021-08-07"

#define MODE_REGULAR 0
#define MODE_VERBOSE 1
Expand Down

0 comments on commit 79a49ff

Please sign in to comment.