mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-12-14 08:56:26 -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
|
|
@ -118,8 +118,7 @@ static void handle_cursor_motion_absolute(struct wl_listener *listener,
|
|||
struct sample_cursor *cursor =
|
||||
wl_container_of(listener, cursor, cursor_motion_absolute);
|
||||
struct wlr_event_pointer_motion_absolute *event = data;
|
||||
wlr_cursor_warp_absolute(cursor->cursor, event->device,
|
||||
event->x_mm / event->width_mm, event->y_mm / event->height_mm);
|
||||
wlr_cursor_warp_absolute(cursor->cursor, event->device, event->x, event->y);
|
||||
}
|
||||
|
||||
static void handle_input_add(struct compositor_state *state,
|
||||
|
|
|
|||
|
|
@ -154,8 +154,8 @@ static void handle_cursor_motion_absolute(struct wl_listener *listener,
|
|||
wl_container_of(listener, sample, cursor_motion_absolute);
|
||||
struct wlr_event_pointer_motion_absolute *event = data;
|
||||
|
||||
sample->cur_x = event->x_mm;
|
||||
sample->cur_y = event->y_mm;
|
||||
sample->cur_x = event->x;
|
||||
sample->cur_y = event->y;
|
||||
|
||||
wlr_cursor_warp_absolute(sample->cursor, event->device, sample->cur_x,
|
||||
sample->cur_y);
|
||||
|
|
@ -252,7 +252,7 @@ static void handle_tablet_tool_axis(struct wl_listener *listener, void *data) {
|
|||
if ((event->updated_axes & WLR_TABLET_TOOL_AXIS_X) &&
|
||||
(event->updated_axes & WLR_TABLET_TOOL_AXIS_Y)) {
|
||||
wlr_cursor_warp_absolute(sample->cursor, event->device,
|
||||
event->x_mm / event->width_mm, event->y_mm / event->height_mm);
|
||||
event->x_mm / event->width_mm, event->y_mm / event->height_mm);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -108,8 +108,8 @@ static void pointer_motion_absolute_notify(struct wl_listener *listener, void *d
|
|||
struct wlr_event_pointer_motion_absolute *event = data;
|
||||
struct pointer_state *pstate = wl_container_of(listener, pstate, motion_absolute);
|
||||
if (pstate->compositor->pointer_motion_absolute_cb) {
|
||||
pstate->compositor->pointer_motion_absolute_cb(pstate,
|
||||
event->x_mm, event->y_mm);
|
||||
pstate->compositor->pointer_motion_absolute_cb(
|
||||
pstate, event->x, event->y);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue