mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-29 16:05:59 +01:00
Merge pull request #900 from emersion/cursor-wrap-absolute-zero
cursor: allow to call wlr_cursor_wrap_absolute with zero
This commit is contained in:
commit
c40f86d27f
1 changed files with 2 additions and 2 deletions
|
@ -262,8 +262,8 @@ void wlr_cursor_warp_absolute(struct wlr_cursor *cur,
|
||||||
mapping = wlr_output_layout_get_box(cur->state->layout, NULL);
|
mapping = wlr_output_layout_get_box(cur->state->layout, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
x = x > 0 ? mapping->width * x + mapping->x : cur->x;
|
x = x >= 0 ? mapping->width * x + mapping->x : cur->x;
|
||||||
y = y > 0 ? mapping->height * y + mapping->y : cur->y;
|
y = y >= 0 ? mapping->height * y + mapping->y : cur->y;
|
||||||
|
|
||||||
wlr_cursor_warp_unchecked(cur, x, y);
|
wlr_cursor_warp_unchecked(cur, x, y);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue