mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-30 00:15:58 +01:00
assert cursor layout for move and warp functions
This commit is contained in:
parent
0cba06dcef
commit
f69a7afd36
1 changed files with 1 additions and 1 deletions
|
@ -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) {
|
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)) {
|
if (!wlr_output_layout_output_at(cur->state->layout, x, y)) {
|
||||||
return false;
|
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) {
|
void wlr_cursor_move(struct wlr_cursor *cur, double delta_x, double delta_y) {
|
||||||
// TODO handle no layout
|
|
||||||
assert(cur->state->layout);
|
assert(cur->state->layout);
|
||||||
|
|
||||||
int x = cur->x + delta_x;
|
int x = cur->x + delta_x;
|
||||||
|
|
Loading…
Reference in a new issue