aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2018-04-24 21:18:08 +0200
committerGitHub <noreply@github.com>2018-04-24 21:18:08 +0200
commitc40f86d27f611a2b34cead63e63c12d6a18263eb (patch)
treed2c499febf98ced9cdf3f1cb454c113a141ec7d8
parenta6790d45b2b25f38754403fe692ee9304aefc5fc (diff)
parentbc0bfde5ee76984e67459287301f4ec14b1bcc49 (diff)
Merge pull request #900 from emersion/cursor-wrap-absolute-zero
cursor: allow to call wlr_cursor_wrap_absolute with zero
-rw-r--r--types/wlr_cursor.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/types/wlr_cursor.c b/types/wlr_cursor.c
index 5142513b..c24601d6 100644
--- a/types/wlr_cursor.c
+++ b/types/wlr_cursor.c
@@ -262,8 +262,8 @@ void wlr_cursor_warp_absolute(struct wlr_cursor *cur,
mapping = wlr_output_layout_get_box(cur->state->layout, NULL);
}
- x = x > 0 ? mapping->width * x + mapping->x : cur->x;
- y = y > 0 ? mapping->height * y + mapping->y : cur->y;
+ x = x >= 0 ? mapping->width * x + mapping->x : cur->x;
+ y = y >= 0 ? mapping->height * y + mapping->y : cur->y;
wlr_cursor_warp_unchecked(cur, x, y);
}