aboutsummaryrefslogtreecommitdiff
path: root/sway
diff options
context:
space:
mode:
authorTony Crisci <tony@dubstepdish.com>2017-12-10 10:08:16 -0500
committerTony Crisci <tony@dubstepdish.com>2017-12-10 10:08:16 -0500
commit5f644d78fc77f48c7f7d839f7c2e318b51c2c6d7 (patch)
tree44bb9aaf21f71783195b3f9c6ac4e36e09500695 /sway
parente69b052a6d88b1c24d5e48ad086480ee04c07c81 (diff)
button and axis events
Diffstat (limited to 'sway')
-rw-r--r--sway/input/cursor.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/sway/input/cursor.c b/sway/input/cursor.c
index 059f907d..5f2d650e 100644
--- a/sway/input/cursor.c
+++ b/sway/input/cursor.c
@@ -25,7 +25,7 @@ static void cursor_send_pointer_motion(struct sway_cursor *cursor,
swayc_t *swayc =
swayc_at(&root_container, cursor->x, cursor->y, &surface, &sx, &sy);
if (swayc) {
- wlr_seat_pointer_enter(seat, surface, sx, sy);
+ wlr_seat_pointer_notify_enter(seat, surface, sx, sy);
wlr_seat_pointer_notify_motion(seat, time, sx, sy);
} else {
wlr_seat_pointer_clear_focus(seat);
@@ -57,49 +57,51 @@ static void handle_cursor_button(struct wl_listener *listener, void *data) {
struct sway_cursor *cursor =
wl_container_of(listener, cursor, button);
struct wlr_event_pointer_button *event = data;
- sway_log(L_DEBUG, "TODO: handle event: %p", event);
+ wlr_seat_pointer_notify_button(cursor->seat->seat, event->time_msec,
+ event->button, event->state);
}
static void handle_cursor_axis(struct wl_listener *listener, void *data) {
struct sway_cursor *cursor =
wl_container_of(listener, cursor, axis);
struct wlr_event_pointer_axis *event = data;
- sway_log(L_DEBUG, "TODO: handle event: %p", event);
+ wlr_seat_pointer_notify_axis(cursor->seat->seat, event->time_msec,
+ event->orientation, event->delta);
}
static void handle_touch_down(struct wl_listener *listener, void *data) {
struct sway_cursor *cursor =
wl_container_of(listener, cursor, touch_down);
struct wlr_event_touch_down *event = data;
- sway_log(L_DEBUG, "TODO: handle event: %p", event);
+ sway_log(L_DEBUG, "TODO: handle touch down event: %p", event);
}
static void handle_touch_up(struct wl_listener *listener, void *data) {
struct sway_cursor *cursor =
wl_container_of(listener, cursor, touch_up);
struct wlr_event_touch_up *event = data;
- sway_log(L_DEBUG, "TODO: handle event: %p", event);
+ sway_log(L_DEBUG, "TODO: handle touch up event: %p", event);
}
static void handle_touch_motion(struct wl_listener *listener, void *data) {
struct sway_cursor *cursor =
wl_container_of(listener, cursor, touch_motion);
struct wlr_event_touch_motion *event = data;
- sway_log(L_DEBUG, "TODO: handle event: %p", event);
+ sway_log(L_DEBUG, "TODO: handle touch motion event: %p", event);
}
static void handle_tool_axis(struct wl_listener *listener, void *data) {
struct sway_cursor *cursor =
wl_container_of(listener, cursor, tool_axis);
struct wlr_event_tablet_tool_axis *event = data;
- sway_log(L_DEBUG, "TODO: handle event: %p", event);
+ sway_log(L_DEBUG, "TODO: handle tool axis event: %p", event);
}
static void handle_tool_tip(struct wl_listener *listener, void *data) {
struct sway_cursor *cursor =
wl_container_of(listener, cursor, tool_tip);
struct wlr_event_tablet_tool_tip *event = data;
- sway_log(L_DEBUG, "TODO: handle event: %p", event);
+ sway_log(L_DEBUG, "TODO: handle tool tip event: %p", event);
}
static void handle_request_set_cursor(struct wl_listener *listener,
@@ -107,7 +109,7 @@ static void handle_request_set_cursor(struct wl_listener *listener,
struct sway_cursor *cursor =
wl_container_of(listener, cursor, request_set_cursor);
struct wlr_seat_pointer_request_set_cursor_event *event = data;
- sway_log(L_DEBUG, "TODO: handle event: %p", event);
+ sway_log(L_DEBUG, "TODO: handle request set cursor event: %p", event);
}
struct sway_cursor *sway_cursor_create(struct sway_seat *seat) {