aboutsummaryrefslogtreecommitdiffstats
path: root/sway/input/cursor.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/input/cursor.c')
-rw-r--r--sway/input/cursor.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sway/input/cursor.c b/sway/input/cursor.c
index b9643535..85d0e825 100644
--- a/sway/input/cursor.c
+++ b/sway/input/cursor.c
@@ -574,7 +574,7 @@ static void handle_tablet_tool_position(struct sway_cursor *cursor,
574 574
575 // The logic for whether we should send a tablet event or an emulated pointer 575 // The logic for whether we should send a tablet event or an emulated pointer
576 // event is tricky. It comes down to: 576 // event is tricky. It comes down to:
577 // * If we began a drag on a non-tablet surface (simulated_tool_tip_down), 577 // * If we began a drag on a non-tablet surface (simulating_pointer_from_tool_tip),
578 // then we should continue sending emulated pointer events regardless of 578 // then we should continue sending emulated pointer events regardless of
579 // whether the surface currently under us accepts tablet or not. 579 // whether the surface currently under us accepts tablet or not.
580 // * Otherwise, if we are over a surface that accepts tablet, then we should 580 // * Otherwise, if we are over a surface that accepts tablet, then we should
@@ -582,7 +582,7 @@ static void handle_tablet_tool_position(struct sway_cursor *cursor,
582 // * If we began a drag over a tablet surface, we should continue sending 582 // * If we began a drag over a tablet surface, we should continue sending
583 // tablet events until the drag is released, even if we are now over a 583 // tablet events until the drag is released, even if we are now over a
584 // non-tablet surface. 584 // non-tablet surface.
585 if (!cursor->simulated_tool_tip_down && 585 if (!cursor->simulating_pointer_from_tool_tip &&
586 ((surface && wlr_surface_accepts_tablet_v2(tablet->tablet_v2, surface)) || 586 ((surface && wlr_surface_accepts_tablet_v2(tablet->tablet_v2, surface)) ||
587 wlr_tablet_tool_v2_has_implicit_grab(tool->tablet_v2_tool))) { 587 wlr_tablet_tool_v2_has_implicit_grab(tool->tablet_v2_tool))) {
588 seatop_tablet_tool_motion(seat, tool, time_msec, dx, dy); 588 seatop_tablet_tool_motion(seat, tool, time_msec, dx, dy);
@@ -671,9 +671,9 @@ static void handle_tool_tip(struct wl_listener *listener, void *data) {
671 wlr_tablet_v2_tablet_tool_notify_up(sway_tool->tablet_v2_tool); 671 wlr_tablet_v2_tablet_tool_notify_up(sway_tool->tablet_v2_tool);
672 } 672 }
673 673
674 cursor->simulated_tool_tip_down = event->state == WLR_TABLET_TOOL_TIP_DOWN; 674 cursor->simulating_pointer_from_tool_tip = event->state == WLR_TABLET_TOOL_TIP_DOWN;
675 dispatch_cursor_button(cursor, event->device, event->time_msec, 675 dispatch_cursor_button(cursor, event->device, event->time_msec,
676 BTN_LEFT, cursor->simulated_tool_tip_down ? 676 BTN_LEFT, cursor->simulating_pointer_from_tool_tip ?
677 WLR_BUTTON_PRESSED : WLR_BUTTON_RELEASED); 677 WLR_BUTTON_PRESSED : WLR_BUTTON_RELEASED);
678 wlr_seat_pointer_notify_frame(cursor->seat->wlr_seat); 678 wlr_seat_pointer_notify_frame(cursor->seat->wlr_seat);
679 transaction_commit_dirty(); 679 transaction_commit_dirty();
@@ -684,10 +684,10 @@ static void handle_tool_tip(struct wl_listener *listener, void *data) {
684 wlr_tablet_v2_tablet_tool_notify_down(sway_tool->tablet_v2_tool); 684 wlr_tablet_v2_tablet_tool_notify_down(sway_tool->tablet_v2_tool);
685 wlr_tablet_tool_v2_start_implicit_grab(sway_tool->tablet_v2_tool); 685 wlr_tablet_tool_v2_start_implicit_grab(sway_tool->tablet_v2_tool);
686 } else { 686 } else {
687 if (cursor->simulated_tool_tip_down) { 687 if (cursor->simulating_pointer_from_tool_tip) {
688 dispatch_cursor_button(cursor, event->device, event->time_msec, BTN_LEFT, 688 dispatch_cursor_button(cursor, event->device, event->time_msec, BTN_LEFT,
689 WLR_BUTTON_RELEASED); 689 WLR_BUTTON_RELEASED);
690 cursor->simulated_tool_tip_down = false; 690 cursor->simulating_pointer_from_tool_tip = false;
691 } 691 }
692 692
693 wlr_tablet_v2_tablet_tool_notify_up(sway_tool->tablet_v2_tool); 693 wlr_tablet_v2_tablet_tool_notify_up(sway_tool->tablet_v2_tool);