mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-03 09:01:40 -05:00
Remove width_mm from wlr_pointer events
This commit is contained in:
parent
330ee08126
commit
a35a5786b0
10 changed files with 22 additions and 30 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue