aboutsummaryrefslogtreecommitdiffstats
path: root/sway/input/seatop_default.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/input/seatop_default.c')
-rw-r--r--sway/input/seatop_default.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/sway/input/seatop_default.c b/sway/input/seatop_default.c
index 64a17157..32c7318b 100644
--- a/sway/input/seatop_default.c
+++ b/sway/input/seatop_default.c
@@ -198,6 +198,25 @@ static void state_add_button(struct seatop_default_event *e, uint32_t button) {
198 * Functions used by handle_button / 198 * Functions used by handle_button /
199 *--------------------------------*/ 199 *--------------------------------*/
200 200
201static void handle_tablet_tool_tip(struct sway_seat *seat,
202 struct sway_tablet_tool *tool, uint32_t time_msec,
203 enum wlr_tablet_tool_tip_state state) {
204 if (state != WLR_TABLET_TOOL_TIP_DOWN) {
205 return;
206 }
207
208 struct sway_cursor *cursor = seat->cursor;
209
210 struct wlr_surface *surface = NULL;
211 double sx, sy;
212 struct sway_node *node = node_at_coords(seat,
213 cursor->cursor->x, cursor->cursor->y, &surface, &sx, &sy);
214
215 if (surface && node && node->type == N_CONTAINER) {
216 seatop_begin_down(seat, node->sway_container, time_msec, sx, sy);
217 }
218}
219
201static void handle_button(struct sway_seat *seat, uint32_t time_msec, 220static void handle_button(struct sway_seat *seat, uint32_t time_msec,
202 struct wlr_input_device *device, uint32_t button, 221 struct wlr_input_device *device, uint32_t button,
203 enum wlr_button_state state) { 222 enum wlr_button_state state) {
@@ -649,6 +668,7 @@ static const struct sway_seatop_impl seatop_impl = {
649 .button = handle_button, 668 .button = handle_button,
650 .pointer_motion = handle_pointer_motion, 669 .pointer_motion = handle_pointer_motion,
651 .pointer_axis = handle_pointer_axis, 670 .pointer_axis = handle_pointer_axis,
671 .tablet_tool_tip = handle_tablet_tool_tip,
652 .tablet_tool_motion = handle_tablet_tool_motion, 672 .tablet_tool_motion = handle_tablet_tool_motion,
653 .rebase = handle_rebase, 673 .rebase = handle_rebase,
654 .allow_set_cursor = true, 674 .allow_set_cursor = true,