diff options
Diffstat (limited to 'sway/input/cursor.c')
-rw-r--r-- | sway/input/cursor.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/sway/input/cursor.c b/sway/input/cursor.c index 756f2f8c..a07bc53b 100644 --- a/sway/input/cursor.c +++ b/sway/input/cursor.c | |||
@@ -680,7 +680,7 @@ void cursor_send_pointer_motion(struct sway_cursor *cursor, | |||
680 | 680 | ||
681 | static void handle_cursor_motion(struct wl_listener *listener, void *data) { | 681 | static void handle_cursor_motion(struct wl_listener *listener, void *data) { |
682 | struct sway_cursor *cursor = wl_container_of(listener, cursor, motion); | 682 | struct sway_cursor *cursor = wl_container_of(listener, cursor, motion); |
683 | wlr_idle_notify_activity(cursor->seat->input->server->idle, cursor->seat->wlr_seat); | 683 | wlr_idle_notify_activity(server.idle, cursor->seat->wlr_seat); |
684 | struct wlr_event_pointer_motion *event = data; | 684 | struct wlr_event_pointer_motion *event = data; |
685 | wlr_cursor_move(cursor->cursor, event->device, | 685 | wlr_cursor_move(cursor->cursor, event->device, |
686 | event->delta_x, event->delta_y); | 686 | event->delta_x, event->delta_y); |
@@ -692,7 +692,7 @@ static void handle_cursor_motion_absolute( | |||
692 | struct wl_listener *listener, void *data) { | 692 | struct wl_listener *listener, void *data) { |
693 | struct sway_cursor *cursor = | 693 | struct sway_cursor *cursor = |
694 | wl_container_of(listener, cursor, motion_absolute); | 694 | wl_container_of(listener, cursor, motion_absolute); |
695 | wlr_idle_notify_activity(cursor->seat->input->server->idle, cursor->seat->wlr_seat); | 695 | wlr_idle_notify_activity(server.idle, cursor->seat->wlr_seat); |
696 | struct wlr_event_pointer_motion_absolute *event = data; | 696 | struct wlr_event_pointer_motion_absolute *event = data; |
697 | wlr_cursor_warp_absolute(cursor->cursor, event->device, event->x, event->y); | 697 | wlr_cursor_warp_absolute(cursor->cursor, event->device, event->x, event->y); |
698 | cursor_send_pointer_motion(cursor, event->time_msec); | 698 | cursor_send_pointer_motion(cursor, event->time_msec); |
@@ -970,7 +970,7 @@ void dispatch_cursor_button(struct sway_cursor *cursor, | |||
970 | 970 | ||
971 | static void handle_cursor_button(struct wl_listener *listener, void *data) { | 971 | static void handle_cursor_button(struct wl_listener *listener, void *data) { |
972 | struct sway_cursor *cursor = wl_container_of(listener, cursor, button); | 972 | struct sway_cursor *cursor = wl_container_of(listener, cursor, button); |
973 | wlr_idle_notify_activity(cursor->seat->input->server->idle, cursor->seat->wlr_seat); | 973 | wlr_idle_notify_activity(server.idle, cursor->seat->wlr_seat); |
974 | struct wlr_event_pointer_button *event = data; | 974 | struct wlr_event_pointer_button *event = data; |
975 | dispatch_cursor_button(cursor, event->device, | 975 | dispatch_cursor_button(cursor, event->device, |
976 | event->time_msec, event->button, event->state); | 976 | event->time_msec, event->button, event->state); |
@@ -1019,7 +1019,7 @@ static void dispatch_cursor_axis(struct sway_cursor *cursor, | |||
1019 | 1019 | ||
1020 | static void handle_cursor_axis(struct wl_listener *listener, void *data) { | 1020 | static void handle_cursor_axis(struct wl_listener *listener, void *data) { |
1021 | struct sway_cursor *cursor = wl_container_of(listener, cursor, axis); | 1021 | struct sway_cursor *cursor = wl_container_of(listener, cursor, axis); |
1022 | wlr_idle_notify_activity(cursor->seat->input->server->idle, cursor->seat->wlr_seat); | 1022 | wlr_idle_notify_activity(server.idle, cursor->seat->wlr_seat); |
1023 | struct wlr_event_pointer_axis *event = data; | 1023 | struct wlr_event_pointer_axis *event = data; |
1024 | dispatch_cursor_axis(cursor, event); | 1024 | dispatch_cursor_axis(cursor, event); |
1025 | transaction_commit_dirty(); | 1025 | transaction_commit_dirty(); |
@@ -1027,7 +1027,7 @@ static void handle_cursor_axis(struct wl_listener *listener, void *data) { | |||
1027 | 1027 | ||
1028 | static void handle_touch_down(struct wl_listener *listener, void *data) { | 1028 | static void handle_touch_down(struct wl_listener *listener, void *data) { |
1029 | struct sway_cursor *cursor = wl_container_of(listener, cursor, touch_down); | 1029 | struct sway_cursor *cursor = wl_container_of(listener, cursor, touch_down); |
1030 | wlr_idle_notify_activity(cursor->seat->input->server->idle, cursor->seat->wlr_seat); | 1030 | wlr_idle_notify_activity(server.idle, cursor->seat->wlr_seat); |
1031 | struct wlr_event_touch_down *event = data; | 1031 | struct wlr_event_touch_down *event = data; |
1032 | 1032 | ||
1033 | struct sway_seat *seat = cursor->seat; | 1033 | struct sway_seat *seat = cursor->seat; |
@@ -1058,7 +1058,7 @@ static void handle_touch_down(struct wl_listener *listener, void *data) { | |||
1058 | 1058 | ||
1059 | static void handle_touch_up(struct wl_listener *listener, void *data) { | 1059 | static void handle_touch_up(struct wl_listener *listener, void *data) { |
1060 | struct sway_cursor *cursor = wl_container_of(listener, cursor, touch_up); | 1060 | struct sway_cursor *cursor = wl_container_of(listener, cursor, touch_up); |
1061 | wlr_idle_notify_activity(cursor->seat->input->server->idle, cursor->seat->wlr_seat); | 1061 | wlr_idle_notify_activity(server.idle, cursor->seat->wlr_seat); |
1062 | struct wlr_event_touch_up *event = data; | 1062 | struct wlr_event_touch_up *event = data; |
1063 | struct wlr_seat *seat = cursor->seat->wlr_seat; | 1063 | struct wlr_seat *seat = cursor->seat->wlr_seat; |
1064 | // TODO: fall back to cursor simulation if client has not bound to touch | 1064 | // TODO: fall back to cursor simulation if client has not bound to touch |
@@ -1068,7 +1068,7 @@ static void handle_touch_up(struct wl_listener *listener, void *data) { | |||
1068 | static void handle_touch_motion(struct wl_listener *listener, void *data) { | 1068 | static void handle_touch_motion(struct wl_listener *listener, void *data) { |
1069 | struct sway_cursor *cursor = | 1069 | struct sway_cursor *cursor = |
1070 | wl_container_of(listener, cursor, touch_motion); | 1070 | wl_container_of(listener, cursor, touch_motion); |
1071 | wlr_idle_notify_activity(cursor->seat->input->server->idle, cursor->seat->wlr_seat); | 1071 | wlr_idle_notify_activity(server.idle, cursor->seat->wlr_seat); |
1072 | struct wlr_event_touch_motion *event = data; | 1072 | struct wlr_event_touch_motion *event = data; |
1073 | 1073 | ||
1074 | struct sway_seat *seat = cursor->seat; | 1074 | struct sway_seat *seat = cursor->seat; |
@@ -1132,7 +1132,7 @@ static void apply_mapping_from_region(struct wlr_input_device *device, | |||
1132 | 1132 | ||
1133 | static void handle_tool_axis(struct wl_listener *listener, void *data) { | 1133 | static void handle_tool_axis(struct wl_listener *listener, void *data) { |
1134 | struct sway_cursor *cursor = wl_container_of(listener, cursor, tool_axis); | 1134 | struct sway_cursor *cursor = wl_container_of(listener, cursor, tool_axis); |
1135 | wlr_idle_notify_activity(cursor->seat->input->server->idle, cursor->seat->wlr_seat); | 1135 | wlr_idle_notify_activity(server.idle, cursor->seat->wlr_seat); |
1136 | struct wlr_event_tablet_tool_axis *event = data; | 1136 | struct wlr_event_tablet_tool_axis *event = data; |
1137 | struct sway_input_device *input_device = event->device->data; | 1137 | struct sway_input_device *input_device = event->device->data; |
1138 | 1138 | ||
@@ -1156,7 +1156,7 @@ static void handle_tool_axis(struct wl_listener *listener, void *data) { | |||
1156 | 1156 | ||
1157 | static void handle_tool_tip(struct wl_listener *listener, void *data) { | 1157 | static void handle_tool_tip(struct wl_listener *listener, void *data) { |
1158 | struct sway_cursor *cursor = wl_container_of(listener, cursor, tool_tip); | 1158 | struct sway_cursor *cursor = wl_container_of(listener, cursor, tool_tip); |
1159 | wlr_idle_notify_activity(cursor->seat->input->server->idle, cursor->seat->wlr_seat); | 1159 | wlr_idle_notify_activity(server.idle, cursor->seat->wlr_seat); |
1160 | struct wlr_event_tablet_tool_tip *event = data; | 1160 | struct wlr_event_tablet_tool_tip *event = data; |
1161 | dispatch_cursor_button(cursor, event->device, event->time_msec, | 1161 | dispatch_cursor_button(cursor, event->device, event->time_msec, |
1162 | BTN_LEFT, event->state == WLR_TABLET_TOOL_TIP_DOWN ? | 1162 | BTN_LEFT, event->state == WLR_TABLET_TOOL_TIP_DOWN ? |
@@ -1166,7 +1166,7 @@ static void handle_tool_tip(struct wl_listener *listener, void *data) { | |||
1166 | 1166 | ||
1167 | static void handle_tool_button(struct wl_listener *listener, void *data) { | 1167 | static void handle_tool_button(struct wl_listener *listener, void *data) { |
1168 | struct sway_cursor *cursor = wl_container_of(listener, cursor, tool_button); | 1168 | struct sway_cursor *cursor = wl_container_of(listener, cursor, tool_button); |
1169 | wlr_idle_notify_activity(cursor->seat->input->server->idle, cursor->seat->wlr_seat); | 1169 | wlr_idle_notify_activity(server.idle, cursor->seat->wlr_seat); |
1170 | struct wlr_event_tablet_tool_button *event = data; | 1170 | struct wlr_event_tablet_tool_button *event = data; |
1171 | // TODO: the user may want to configure which tool buttons are mapped to | 1171 | // TODO: the user may want to configure which tool buttons are mapped to |
1172 | // which simulated pointer buttons | 1172 | // which simulated pointer buttons |