aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTony Crisci <tony@dubstepdish.com>2017-08-24 10:53:11 -0400
committerTony Crisci <tony@dubstepdish.com>2017-08-26 08:32:11 -0400
commitf69a7afd369d4febdd2c14519bf11dab65fccc24 (patch)
tree38ed6c776fead90e08d5b06a9586ec770b651303
parent0cba06dcef791d8dc1702270cae2915936380a46 (diff)
assert cursor layout for move and warp functions
-rw-r--r--types/wlr_cursor.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/types/wlr_cursor.c b/types/wlr_cursor.c
index 948ab550..9a303d37 100644
--- a/types/wlr_cursor.c
+++ b/types/wlr_cursor.c
@@ -65,6 +65,7 @@ void wlr_cursor_set_xcursor(struct wlr_cursor *cur, struct wlr_xcursor *xcur) {
}
bool wlr_cursor_warp(struct wlr_cursor *cur, double x, double y) {
+ assert(cur->state->layout);
if (!wlr_output_layout_output_at(cur->state->layout, x, y)) {
return false;
}
@@ -95,7 +96,6 @@ bool wlr_cursor_warp(struct wlr_cursor *cur, double x, double y) {
}
void wlr_cursor_move(struct wlr_cursor *cur, double delta_x, double delta_y) {
- // TODO handle no layout
assert(cur->state->layout);
int x = cur->x + delta_x;