Remove width_mm from wlr_pointer events

This commit is contained in:
Drew DeVault 2018-03-28 10:46:50 -04:00
parent 330ee08126
commit a35a5786b0
10 changed files with 22 additions and 30 deletions

View file

@ -254,7 +254,7 @@ bool wlr_cursor_warp(struct wlr_cursor *cur, struct wlr_input_device *dev,
}
void wlr_cursor_warp_absolute(struct wlr_cursor *cur,
struct wlr_input_device *dev, double x_mm, double y_mm) {
struct wlr_input_device *dev, double x, double y) {
assert(cur->state->layout);
struct wlr_box *mapping = get_mapping(cur, dev);
@ -262,8 +262,8 @@ void wlr_cursor_warp_absolute(struct wlr_cursor *cur,
mapping = wlr_output_layout_get_box(cur->state->layout, NULL);
}
double x = x_mm > 0 ? mapping->width * x_mm + mapping->x : cur->x;
double y = y_mm > 0 ? mapping->height * y_mm + 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);
}