Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

xdo_osx: Fix screen boundary calculations

  • Loading branch information...
commit 0fd91126c5a240036143f013f9bc7c16f14dff7a 1 parent ef16e31
@thp authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 examples/labs/x11mouse/xdo_osx.m
View
4 examples/labs/x11mouse/xdo_osx.m
@@ -63,8 +63,8 @@
y += xdo->screen_rect.size.height - xdo->mouse.y;
// Coordinates need clipping to avoid strange "jumping" behavior
- xdo->point.x = MAX(1, MIN(xdo->screen_rect.size.width, x));
- xdo->point.y = MAX(1, MIN(xdo->screen_rect.size.height, y));
+ xdo->point.x = MAX(1, MIN(xdo->screen_rect.size.width - 1, x));
+ xdo->point.y = MAX(1, MIN(xdo->screen_rect.size.height - 1, y));
}
void
Please sign in to comment.
Something went wrong with that request. Please try again.