aboutsummaryrefslogtreecommitdiff
path: root/sway
diff options
context:
space:
mode:
authorTudor Brindus <me@tbrindus.ca>2020-05-28 19:15:25 -0400
committerSimon Ser <contact@emersion.fr>2020-05-29 08:44:56 +0200
commit6da1631090d29b11c068b930a392a86dd207be4f (patch)
treeccabeffcd637eb4e10a4b84118e626cc4dfda572 /sway
parent6f7b548589feead7c3c3ae8d619f23770fd65fb0 (diff)
input/cursor: rename `simulated_tool_tip_down` to be more accurate
This is a tiny cleanup commit that renames `simulated_tool_tip_down` to `simulating_pointer_from_tool_tip`, making it match `simulating_pointer_from_touch`. This is a better name since it makes it clear that it's the *pointer* that's being simulated, not the tool tip.
Diffstat (limited to 'sway')
-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,
// The logic for whether we should send a tablet event or an emulated pointer
// event is tricky. It comes down to:
- // * If we began a drag on a non-tablet surface (simulated_tool_tip_down),
+ // * If we began a drag on a non-tablet surface (simulating_pointer_from_tool_tip),
// then we should continue sending emulated pointer events regardless of
// whether the surface currently under us accepts tablet or not.
// * 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,
// * If we began a drag over a tablet surface, we should continue sending
// tablet events until the drag is released, even if we are now over a
// non-tablet surface.
- if (!cursor->simulated_tool_tip_down &&
+ if (!cursor->simulating_pointer_from_tool_tip &&
((surface && wlr_surface_accepts_tablet_v2(tablet->tablet_v2, surface)) ||
wlr_tablet_tool_v2_has_implicit_grab(tool->tablet_v2_tool))) {
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) {
wlr_tablet_v2_tablet_tool_notify_up(sway_tool->tablet_v2_tool);
}
- cursor->simulated_tool_tip_down = event->state == WLR_TABLET_TOOL_TIP_DOWN;
+ cursor->simulating_pointer_from_tool_tip = event->state == WLR_TABLET_TOOL_TIP_DOWN;
dispatch_cursor_button(cursor, event->device, event->time_msec,
- BTN_LEFT, cursor->simulated_tool_tip_down ?
+ BTN_LEFT, cursor->simulating_pointer_from_tool_tip ?
WLR_BUTTON_PRESSED : WLR_BUTTON_RELEASED);
wlr_seat_pointer_notify_frame(cursor->seat->wlr_seat);
transaction_commit_dirty();
@@ -684,10 +684,10 @@ static void handle_tool_tip(struct wl_listener *listener, void *data) {
wlr_tablet_v2_tablet_tool_notify_down(sway_tool->tablet_v2_tool);
wlr_tablet_tool_v2_start_implicit_grab(sway_tool->tablet_v2_tool);
} else {
- if (cursor->simulated_tool_tip_down) {
+ if (cursor->simulating_pointer_from_tool_tip) {
dispatch_cursor_button(cursor, event->device, event->time_msec, BTN_LEFT,
WLR_BUTTON_RELEASED);
- cursor->simulated_tool_tip_down = false;
+ cursor->simulating_pointer_from_tool_tip = false;
}
wlr_tablet_v2_tablet_tool_notify_up(sway_tool->tablet_v2_tool);