diff options
author | emersion <contact@emersion.fr> | 2018-09-12 19:01:50 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-12 19:01:50 +0200 |
commit | 769a8e9917ab0f04404843fb712a6b0b0434c966 (patch) | |
tree | d63733c0688a410a7a795c2367d248895bd290c9 /rootston | |
parent | b2112686df29e5d7df7fbd10eedf94710d12756c (diff) | |
parent | 21e1cc9ab47f115a888154aa62a2c4b2ae8f1691 (diff) |
Merge pull request #1160 from Ongy/tablet-grabs
Tablet grabs
Diffstat (limited to 'rootston')
-rw-r--r-- | rootston/seat.c | 37 |
1 files changed, 19 insertions, 18 deletions
diff --git a/rootston/seat.c b/rootston/seat.c index a8e418ca..1ae098bc 100644 --- a/rootston/seat.c +++ b/rootston/seat.c @@ -129,21 +129,21 @@ static void handle_tablet_tool_position(struct roots_cursor *cursor, struct roots_tablet_tool *roots_tool = tool->data; if (!surface) { - wlr_send_tablet_v2_tablet_tool_proximity_out(roots_tool->tablet_v2_tool); + wlr_tablet_v2_tablet_tool_notify_proximity_out(roots_tool->tablet_v2_tool); /* XXX: TODO: Fallback pointer semantics */ return; } if (!wlr_surface_accepts_tablet_v2(tablet->tablet_v2, surface)) { - wlr_send_tablet_v2_tablet_tool_proximity_out(roots_tool->tablet_v2_tool); + wlr_tablet_v2_tablet_tool_notify_proximity_out(roots_tool->tablet_v2_tool); /* XXX: TODO: Fallback pointer semantics */ return; } - wlr_send_tablet_v2_tablet_tool_proximity_in(roots_tool->tablet_v2_tool, + wlr_tablet_v2_tablet_tool_notify_proximity_in(roots_tool->tablet_v2_tool, tablet->tablet_v2, surface); - wlr_send_tablet_v2_tablet_tool_motion(roots_tool->tablet_v2_tool, sx, sy); + wlr_tablet_v2_tablet_tool_notify_motion(roots_tool->tablet_v2_tool, sx, sy); } static void handle_tool_axis(struct wl_listener *listener, void *data) { @@ -169,32 +169,32 @@ static void handle_tool_axis(struct wl_listener *listener, void *data) { event->x, event->y, event->dx, event->dy); if (event->updated_axes & WLR_TABLET_TOOL_AXIS_PRESSURE) { - wlr_send_tablet_v2_tablet_tool_pressure( + wlr_tablet_v2_tablet_tool_notify_pressure( roots_tool->tablet_v2_tool, event->pressure); } if (event->updated_axes & WLR_TABLET_TOOL_AXIS_DISTANCE) { - wlr_send_tablet_v2_tablet_tool_distance( + wlr_tablet_v2_tablet_tool_notify_distance( roots_tool->tablet_v2_tool, event->distance); } if (event->updated_axes & (WLR_TABLET_TOOL_AXIS_TILT_X | WLR_TABLET_TOOL_AXIS_TILT_Y)) { - wlr_send_tablet_v2_tablet_tool_tilt( + wlr_tablet_v2_tablet_tool_notify_tilt( roots_tool->tablet_v2_tool, event->tilt_x, event->tilt_y); } if (event->updated_axes & WLR_TABLET_TOOL_AXIS_ROTATION) { - wlr_send_tablet_v2_tablet_tool_rotation( + wlr_tablet_v2_tablet_tool_notify_rotation( roots_tool->tablet_v2_tool, event->rotation); } if (event->updated_axes & WLR_TABLET_TOOL_AXIS_SLIDER) { - wlr_send_tablet_v2_tablet_tool_slider( + wlr_tablet_v2_tablet_tool_notify_slider( roots_tool->tablet_v2_tool, event->slider); } if (event->updated_axes & WLR_TABLET_TOOL_AXIS_WHEEL) { - wlr_send_tablet_v2_tablet_tool_wheel( + wlr_tablet_v2_tablet_tool_notify_wheel( roots_tool->tablet_v2_tool, event->wheel_delta, 0); } } @@ -208,9 +208,10 @@ static void handle_tool_tip(struct wl_listener *listener, void *data) { struct roots_tablet_tool *roots_tool = event->tool->data; if (event->state == WLR_TABLET_TOOL_TIP_DOWN) { - wlr_send_tablet_v2_tablet_tool_down(roots_tool->tablet_v2_tool); + wlr_tablet_v2_tablet_tool_notify_down(roots_tool->tablet_v2_tool); + wlr_tablet_tool_v2_start_implicit_grab(roots_tool->tablet_v2_tool); } else { - wlr_send_tablet_v2_tablet_tool_up(roots_tool->tablet_v2_tool); + wlr_tablet_v2_tablet_tool_notify_up(roots_tool->tablet_v2_tool); } } @@ -235,7 +236,7 @@ static void handle_tool_button(struct wl_listener *listener, void *data) { struct wlr_event_tablet_tool_button *event = data; struct roots_tablet_tool *roots_tool = event->tool->data; - wlr_send_tablet_v2_tablet_tool_button(roots_tool->tablet_v2_tool, + wlr_tablet_v2_tablet_tool_notify_button(roots_tool->tablet_v2_tool, (enum zwp_tablet_pad_v2_button_state)event->button, (enum zwp_tablet_pad_v2_button_state)event->state); } @@ -764,7 +765,7 @@ static void handle_tablet_pad_ring(struct wl_listener *listener, void *data) { wl_container_of(listener, pad, ring); struct wlr_event_tablet_pad_ring *event = data; - wlr_send_tablet_v2_tablet_pad_ring(pad->tablet_v2_pad, + wlr_tablet_v2_tablet_pad_notify_ring(pad->tablet_v2_pad, event->ring, event->position, event->source == WLR_TABLET_PAD_RING_SOURCE_FINGER, event->time_msec); @@ -775,7 +776,7 @@ static void handle_tablet_pad_strip(struct wl_listener *listener, void *data) { wl_container_of(listener, pad, strip); struct wlr_event_tablet_pad_strip *event = data; - wlr_send_tablet_v2_tablet_pad_strip(pad->tablet_v2_pad, + wlr_tablet_v2_tablet_pad_notify_strip(pad->tablet_v2_pad, event->strip, event->position, event->source == WLR_TABLET_PAD_STRIP_SOURCE_FINGER, event->time_msec); @@ -786,10 +787,10 @@ static void handle_tablet_pad_button(struct wl_listener *listener, void *data) { wl_container_of(listener, pad, button); struct wlr_event_tablet_pad_button *event = data; - wlr_send_tablet_v2_tablet_pad_mode(pad->tablet_v2_pad, + wlr_tablet_v2_tablet_pad_notify_mode(pad->tablet_v2_pad, event->group, event->mode, event->time_msec); - wlr_send_tablet_v2_tablet_pad_button(pad->tablet_v2_pad, + wlr_tablet_v2_tablet_pad_notify_button(pad->tablet_v2_pad, event->button, event->time_msec, (enum zwp_tablet_pad_v2_button_state)event->state); } @@ -1178,7 +1179,7 @@ void roots_seat_set_focus(struct roots_seat *seat, struct roots_view *view) { struct roots_tablet_pad *pad; wl_list_for_each(pad, &seat->tablet_pads, link) { if (pad->tablet) { - wlr_send_tablet_v2_tablet_pad_enter(pad->tablet_v2_pad, pad->tablet->tablet_v2, view->wlr_surface); + wlr_tablet_v2_tablet_pad_notify_enter(pad->tablet_v2_pad, pad->tablet->tablet_v2, view->wlr_surface); } } } else { |