aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/sway/input/seat.h13
-rw-r--r--sway/input/cursor.c4
-rw-r--r--sway/input/seat.c11
-rw-r--r--sway/input/seatop_default.c5
-rw-r--r--sway/input/seatop_down.c5
-rw-r--r--sway/input/seatop_move_floating.c3
-rw-r--r--sway/input/seatop_move_tiling.c3
-rw-r--r--sway/input/seatop_resize_floating.c3
-rw-r--r--sway/input/seatop_resize_tiling.c3
9 files changed, 19 insertions, 31 deletions
diff --git a/include/sway/input/seat.h b/include/sway/input/seat.h
index 2256fff1..4118df66 100644
--- a/include/sway/input/seat.h
+++ b/include/sway/input/seat.h
@@ -16,13 +16,12 @@ struct sway_seatop_impl {
16 void (*button)(struct sway_seat *seat, uint32_t time_msec, 16 void (*button)(struct sway_seat *seat, uint32_t time_msec,
17 struct wlr_input_device *device, uint32_t button, 17 struct wlr_input_device *device, uint32_t button,
18 enum wlr_button_state state); 18 enum wlr_button_state state);
19 void (*pointer_motion)(struct sway_seat *seat, uint32_t time_msec, 19 void (*pointer_motion)(struct sway_seat *seat, uint32_t time_msec);
20 double dx, double dy);
21 void (*pointer_axis)(struct sway_seat *seat, 20 void (*pointer_axis)(struct sway_seat *seat,
22 struct wlr_event_pointer_axis *event); 21 struct wlr_event_pointer_axis *event);
23 void (*rebase)(struct sway_seat *seat, uint32_t time_msec); 22 void (*rebase)(struct sway_seat *seat, uint32_t time_msec);
24 void (*tablet_tool_motion)(struct sway_seat *seat, 23 void (*tablet_tool_motion)(struct sway_seat *seat,
25 struct sway_tablet_tool *tool, uint32_t time_msec, double dx, double dy); 24 struct sway_tablet_tool *tool, uint32_t time_msec);
26 void (*tablet_tool_tip)(struct sway_seat *seat, struct sway_tablet_tool *tool, 25 void (*tablet_tool_tip)(struct sway_seat *seat, struct sway_tablet_tool *tool,
27 uint32_t time_msec, enum wlr_tablet_tool_tip_state state); 26 uint32_t time_msec, enum wlr_tablet_tool_tip_state state);
28 void (*end)(struct sway_seat *seat); 27 void (*end)(struct sway_seat *seat);
@@ -269,11 +268,7 @@ void seatop_button(struct sway_seat *seat, uint32_t time_msec,
269 struct wlr_input_device *device, uint32_t button, 268 struct wlr_input_device *device, uint32_t button,
270 enum wlr_button_state state); 269 enum wlr_button_state state);
271 270
272/** 271void seatop_pointer_motion(struct sway_seat *seat, uint32_t time_msec);
273 * dx and dy are distances relative to previous position.
274 */
275void seatop_pointer_motion(struct sway_seat *seat, uint32_t time_msec,
276 double dx, double dy);
277 272
278void seatop_pointer_axis(struct sway_seat *seat, 273void seatop_pointer_axis(struct sway_seat *seat,
279 struct wlr_event_pointer_axis *event); 274 struct wlr_event_pointer_axis *event);
@@ -283,7 +278,7 @@ void seatop_tablet_tool_tip(struct sway_seat *seat,
283 enum wlr_tablet_tool_tip_state state); 278 enum wlr_tablet_tool_tip_state state);
284 279
285void seatop_tablet_tool_motion(struct sway_seat *seat, 280void seatop_tablet_tool_motion(struct sway_seat *seat,
286 struct sway_tablet_tool *tool, uint32_t time_msec, double dx, double dy); 281 struct sway_tablet_tool *tool, uint32_t time_msec);
287 282
288void seatop_rebase(struct sway_seat *seat, uint32_t time_msec); 283void seatop_rebase(struct sway_seat *seat, uint32_t time_msec);
289 284
diff --git a/sway/input/cursor.c b/sway/input/cursor.c
index b168afc5..9ad4900b 100644
--- a/sway/input/cursor.c
+++ b/sway/input/cursor.c
@@ -359,7 +359,7 @@ static void pointer_motion(struct sway_cursor *cursor, uint32_t time_msec,
359 359
360 wlr_cursor_move(cursor->cursor, device, dx, dy); 360 wlr_cursor_move(cursor->cursor, device, dx, dy);
361 361
362 seatop_pointer_motion(cursor->seat, time_msec, dx, dy); 362 seatop_pointer_motion(cursor->seat, time_msec);
363} 363}
364 364
365static void handle_pointer_motion_relative( 365static void handle_pointer_motion_relative(
@@ -621,7 +621,7 @@ static void handle_tablet_tool_position(struct sway_cursor *cursor,
621 if (!cursor->simulating_pointer_from_tool_tip && 621 if (!cursor->simulating_pointer_from_tool_tip &&
622 ((surface && wlr_surface_accepts_tablet_v2(tablet->tablet_v2, surface)) || 622 ((surface && wlr_surface_accepts_tablet_v2(tablet->tablet_v2, surface)) ||
623 wlr_tablet_tool_v2_has_implicit_grab(tool->tablet_v2_tool))) { 623 wlr_tablet_tool_v2_has_implicit_grab(tool->tablet_v2_tool))) {
624 seatop_tablet_tool_motion(seat, tool, time_msec, dx, dy); 624 seatop_tablet_tool_motion(seat, tool, time_msec);
625 } else { 625 } else {
626 wlr_tablet_v2_tablet_tool_notify_proximity_out(tool->tablet_v2_tool); 626 wlr_tablet_v2_tablet_tool_notify_proximity_out(tool->tablet_v2_tool);
627 pointer_motion(cursor, time_msec, input_device->wlr_device, dx, dy, dx, dy); 627 pointer_motion(cursor, time_msec, input_device->wlr_device, dx, dy, dx, dy);
diff --git a/sway/input/seat.c b/sway/input/seat.c
index 04b480d8..e178c08a 100644
--- a/sway/input/seat.c
+++ b/sway/input/seat.c
@@ -1500,10 +1500,9 @@ void seatop_button(struct sway_seat *seat, uint32_t time_msec,
1500 } 1500 }
1501} 1501}
1502 1502
1503void seatop_pointer_motion(struct sway_seat *seat, uint32_t time_msec, 1503void seatop_pointer_motion(struct sway_seat *seat, uint32_t time_msec) {
1504 double dx, double dy) {
1505 if (seat->seatop_impl->pointer_motion) { 1504 if (seat->seatop_impl->pointer_motion) {
1506 seat->seatop_impl->pointer_motion(seat, time_msec, dx, dy); 1505 seat->seatop_impl->pointer_motion(seat, time_msec);
1507 } 1506 }
1508} 1507}
1509 1508
@@ -1523,11 +1522,11 @@ void seatop_tablet_tool_tip(struct sway_seat *seat,
1523} 1522}
1524 1523
1525void seatop_tablet_tool_motion(struct sway_seat *seat, 1524void seatop_tablet_tool_motion(struct sway_seat *seat,
1526 struct sway_tablet_tool *tool, uint32_t time_msec, double dx, double dy) { 1525 struct sway_tablet_tool *tool, uint32_t time_msec) {
1527 if (seat->seatop_impl->tablet_tool_motion) { 1526 if (seat->seatop_impl->tablet_tool_motion) {
1528 seat->seatop_impl->tablet_tool_motion(seat, tool, time_msec, dx, dy); 1527 seat->seatop_impl->tablet_tool_motion(seat, tool, time_msec);
1529 } else { 1528 } else {
1530 seatop_pointer_motion(seat, time_msec, dx, dy); 1529 seatop_pointer_motion(seat, time_msec);
1531 } 1530 }
1532} 1531}
1533 1532
diff --git a/sway/input/seatop_default.c b/sway/input/seatop_default.c
index ae593f5c..2bee389e 100644
--- a/sway/input/seatop_default.c
+++ b/sway/input/seatop_default.c
@@ -557,8 +557,7 @@ static void check_focus_follows_mouse(struct sway_seat *seat,
557 } 557 }
558} 558}
559 559
560static void handle_pointer_motion(struct sway_seat *seat, uint32_t time_msec, 560static void handle_pointer_motion(struct sway_seat *seat, uint32_t time_msec) {
561 double dx, double dy) {
562 struct seatop_default_event *e = seat->seatop_data; 561 struct seatop_default_event *e = seat->seatop_data;
563 struct sway_cursor *cursor = seat->cursor; 562 struct sway_cursor *cursor = seat->cursor;
564 563
@@ -592,7 +591,7 @@ static void handle_pointer_motion(struct sway_seat *seat, uint32_t time_msec,
592} 591}
593 592
594static void handle_tablet_tool_motion(struct sway_seat *seat, 593static void handle_tablet_tool_motion(struct sway_seat *seat,
595 struct sway_tablet_tool *tool, uint32_t time_msec, double dx, double dy) { 594 struct sway_tablet_tool *tool, uint32_t time_msec) {
596 struct seatop_default_event *e = seat->seatop_data; 595 struct seatop_default_event *e = seat->seatop_data;
597 struct sway_cursor *cursor = seat->cursor; 596 struct sway_cursor *cursor = seat->cursor;
598 597
diff --git a/sway/input/seatop_down.c b/sway/input/seatop_down.c
index 0d24f480..17f619e3 100644
--- a/sway/input/seatop_down.c
+++ b/sway/input/seatop_down.c
@@ -37,8 +37,7 @@ static void handle_button(struct sway_seat *seat, uint32_t time_msec,
37 } 37 }
38} 38}
39 39
40static void handle_pointer_motion(struct sway_seat *seat, uint32_t time_msec, 40static void handle_pointer_motion(struct sway_seat *seat, uint32_t time_msec) {
41 double dx, double dy) {
42 struct seatop_down_event *e = seat->seatop_data; 41 struct seatop_down_event *e = seat->seatop_data;
43 struct sway_container *con = e->con; 42 struct sway_container *con = e->con;
44 if (seat_is_input_allowed(seat, con->view->surface)) { 43 if (seat_is_input_allowed(seat, con->view->surface)) {
@@ -60,7 +59,7 @@ static void handle_tablet_tool_tip(struct sway_seat *seat,
60} 59}
61 60
62static void handle_tablet_tool_motion(struct sway_seat *seat, 61static void handle_tablet_tool_motion(struct sway_seat *seat,
63 struct sway_tablet_tool *tool, uint32_t time_msec, double dx, double dy) { 62 struct sway_tablet_tool *tool, uint32_t time_msec) {
64 struct seatop_down_event *e = seat->seatop_data; 63 struct seatop_down_event *e = seat->seatop_data;
65 struct sway_container *con = e->con; 64 struct sway_container *con = e->con;
66 if (seat_is_input_allowed(seat, con->view->surface)) { 65 if (seat_is_input_allowed(seat, con->view->surface)) {
diff --git a/sway/input/seatop_move_floating.c b/sway/input/seatop_move_floating.c
index b9a20402..7f501fc9 100644
--- a/sway/input/seatop_move_floating.c
+++ b/sway/input/seatop_move_floating.c
@@ -34,8 +34,7 @@ static void handle_tablet_tool_tip(struct sway_seat *seat,
34 finalize_move(seat); 34 finalize_move(seat);
35 } 35 }
36} 36}
37static void handle_pointer_motion(struct sway_seat *seat, uint32_t time_msec, 37static void handle_pointer_motion(struct sway_seat *seat, uint32_t time_msec) {
38 double dx, double dy) {
39 struct seatop_move_floating_event *e = seat->seatop_data; 38 struct seatop_move_floating_event *e = seat->seatop_data;
40 struct wlr_cursor *cursor = seat->cursor->cursor; 39 struct wlr_cursor *cursor = seat->cursor->cursor;
41 desktop_damage_whole_container(e->con); 40 desktop_damage_whole_container(e->con);
diff --git a/sway/input/seatop_move_tiling.c b/sway/input/seatop_move_tiling.c
index 2d3abc9a..c7285bec 100644
--- a/sway/input/seatop_move_tiling.c
+++ b/sway/input/seatop_move_tiling.c
@@ -207,8 +207,7 @@ static void handle_motion_postthreshold(struct sway_seat *seat) {
207 desktop_damage_box(&e->drop_box); 207 desktop_damage_box(&e->drop_box);
208} 208}
209 209
210static void handle_pointer_motion(struct sway_seat *seat, uint32_t time_msec, 210static void handle_pointer_motion(struct sway_seat *seat, uint32_t time_msec) {
211 double dx, double dy) {
212 struct seatop_move_tiling_event *e = seat->seatop_data; 211 struct seatop_move_tiling_event *e = seat->seatop_data;
213 if (e->threshold_reached) { 212 if (e->threshold_reached) {
214 handle_motion_postthreshold(seat); 213 handle_motion_postthreshold(seat);
diff --git a/sway/input/seatop_resize_floating.c b/sway/input/seatop_resize_floating.c
index 10af06fe..5da22e47 100644
--- a/sway/input/seatop_resize_floating.c
+++ b/sway/input/seatop_resize_floating.c
@@ -31,8 +31,7 @@ static void handle_button(struct sway_seat *seat, uint32_t time_msec,
31 } 31 }
32} 32}
33 33
34static void handle_pointer_motion(struct sway_seat *seat, uint32_t time_msec, 34static void handle_pointer_motion(struct sway_seat *seat, uint32_t time_msec) {
35 double dx, double dy) {
36 struct seatop_resize_floating_event *e = seat->seatop_data; 35 struct seatop_resize_floating_event *e = seat->seatop_data;
37 struct sway_container *con = e->con; 36 struct sway_container *con = e->con;
38 enum wlr_edges edge = e->edge; 37 enum wlr_edges edge = e->edge;
diff --git a/sway/input/seatop_resize_tiling.c b/sway/input/seatop_resize_tiling.c
index 05be6e70..2cca805d 100644
--- a/sway/input/seatop_resize_tiling.c
+++ b/sway/input/seatop_resize_tiling.c
@@ -71,8 +71,7 @@ static void handle_button(struct sway_seat *seat, uint32_t time_msec,
71 } 71 }
72} 72}
73 73
74static void handle_pointer_motion(struct sway_seat *seat, uint32_t time_msec, 74static void handle_pointer_motion(struct sway_seat *seat, uint32_t time_msec) {
75 double dx, double dy) {
76 struct seatop_resize_tiling_event *e = seat->seatop_data; 75 struct seatop_resize_tiling_event *e = seat->seatop_data;
77 int amount_x = 0; 76 int amount_x = 0;
78 int amount_y = 0; 77 int amount_y = 0;