aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTudor Brindus <me@tbrindus.ca>2020-10-31 17:56:21 -0400
committerSimon Ser <contact@emersion.fr>2020-10-31 23:15:32 +0100
commit8c12e71a66feb1cac545dc8746f817772eb77d2f (patch)
tree27fe7bbb78ac8c9d38762145405830b4f1d6ea6b
parent96578aa91e9856bfb3e2d26fb7a625ff7c9b79e3 (diff)
input: remove motion deltas from seatop callbacks
Straightforward cleanup, they haven't been used for a while.
-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 {
void (*button)(struct sway_seat *seat, uint32_t time_msec,
struct wlr_input_device *device, uint32_t button,
enum wlr_button_state state);
- void (*pointer_motion)(struct sway_seat *seat, uint32_t time_msec,
- double dx, double dy);
+ void (*pointer_motion)(struct sway_seat *seat, uint32_t time_msec);
void (*pointer_axis)(struct sway_seat *seat,
struct wlr_event_pointer_axis *event);
void (*rebase)(struct sway_seat *seat, uint32_t time_msec);
void (*tablet_tool_motion)(struct sway_seat *seat,
- struct sway_tablet_tool *tool, uint32_t time_msec, double dx, double dy);
+ struct sway_tablet_tool *tool, uint32_t time_msec);
void (*tablet_tool_tip)(struct sway_seat *seat, struct sway_tablet_tool *tool,
uint32_t time_msec, enum wlr_tablet_tool_tip_state state);
void (*end)(struct sway_seat *seat);
@@ -269,11 +268,7 @@ void seatop_button(struct sway_seat *seat, uint32_t time_msec,
struct wlr_input_device *device, uint32_t button,
enum wlr_button_state state);
-/**
- * dx and dy are distances relative to previous position.
- */
-void seatop_pointer_motion(struct sway_seat *seat, uint32_t time_msec,
- double dx, double dy);
+void seatop_pointer_motion(struct sway_seat *seat, uint32_t time_msec);
void seatop_pointer_axis(struct sway_seat *seat,
struct wlr_event_pointer_axis *event);
@@ -283,7 +278,7 @@ void seatop_tablet_tool_tip(struct sway_seat *seat,
enum wlr_tablet_tool_tip_state state);
void seatop_tablet_tool_motion(struct sway_seat *seat,
- struct sway_tablet_tool *tool, uint32_t time_msec, double dx, double dy);
+ struct sway_tablet_tool *tool, uint32_t time_msec);
void seatop_rebase(struct sway_seat *seat, uint32_t time_msec);
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,
wlr_cursor_move(cursor->cursor, device, dx, dy);
- seatop_pointer_motion(cursor->seat, time_msec, dx, dy);
+ seatop_pointer_motion(cursor->seat, time_msec);
}
static void handle_pointer_motion_relative(
@@ -621,7 +621,7 @@ static void handle_tablet_tool_position(struct sway_cursor *cursor,
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);
+ seatop_tablet_tool_motion(seat, tool, time_msec);
} else {
wlr_tablet_v2_tablet_tool_notify_proximity_out(tool->tablet_v2_tool);
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,
}
}
-void seatop_pointer_motion(struct sway_seat *seat, uint32_t time_msec,
- double dx, double dy) {
+void seatop_pointer_motion(struct sway_seat *seat, uint32_t time_msec) {
if (seat->seatop_impl->pointer_motion) {
- seat->seatop_impl->pointer_motion(seat, time_msec, dx, dy);
+ seat->seatop_impl->pointer_motion(seat, time_msec);
}
}
@@ -1523,11 +1522,11 @@ void seatop_tablet_tool_tip(struct sway_seat *seat,
}
void seatop_tablet_tool_motion(struct sway_seat *seat,
- struct sway_tablet_tool *tool, uint32_t time_msec, double dx, double dy) {
+ struct sway_tablet_tool *tool, uint32_t time_msec) {
if (seat->seatop_impl->tablet_tool_motion) {
- seat->seatop_impl->tablet_tool_motion(seat, tool, time_msec, dx, dy);
+ seat->seatop_impl->tablet_tool_motion(seat, tool, time_msec);
} else {
- seatop_pointer_motion(seat, time_msec, dx, dy);
+ seatop_pointer_motion(seat, time_msec);
}
}
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,
}
}
-static void handle_pointer_motion(struct sway_seat *seat, uint32_t time_msec,
- double dx, double dy) {
+static void handle_pointer_motion(struct sway_seat *seat, uint32_t time_msec) {
struct seatop_default_event *e = seat->seatop_data;
struct sway_cursor *cursor = seat->cursor;
@@ -592,7 +591,7 @@ static void handle_pointer_motion(struct sway_seat *seat, uint32_t time_msec,
}
static void handle_tablet_tool_motion(struct sway_seat *seat,
- struct sway_tablet_tool *tool, uint32_t time_msec, double dx, double dy) {
+ struct sway_tablet_tool *tool, uint32_t time_msec) {
struct seatop_default_event *e = seat->seatop_data;
struct sway_cursor *cursor = seat->cursor;
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,
}
}
-static void handle_pointer_motion(struct sway_seat *seat, uint32_t time_msec,
- double dx, double dy) {
+static void handle_pointer_motion(struct sway_seat *seat, uint32_t time_msec) {
struct seatop_down_event *e = seat->seatop_data;
struct sway_container *con = e->con;
if (seat_is_input_allowed(seat, con->view->surface)) {
@@ -60,7 +59,7 @@ static void handle_tablet_tool_tip(struct sway_seat *seat,
}
static void handle_tablet_tool_motion(struct sway_seat *seat,
- struct sway_tablet_tool *tool, uint32_t time_msec, double dx, double dy) {
+ struct sway_tablet_tool *tool, uint32_t time_msec) {
struct seatop_down_event *e = seat->seatop_data;
struct sway_container *con = e->con;
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,
finalize_move(seat);
}
}
-static void handle_pointer_motion(struct sway_seat *seat, uint32_t time_msec,
- double dx, double dy) {
+static void handle_pointer_motion(struct sway_seat *seat, uint32_t time_msec) {
struct seatop_move_floating_event *e = seat->seatop_data;
struct wlr_cursor *cursor = seat->cursor->cursor;
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) {
desktop_damage_box(&e->drop_box);
}
-static void handle_pointer_motion(struct sway_seat *seat, uint32_t time_msec,
- double dx, double dy) {
+static void handle_pointer_motion(struct sway_seat *seat, uint32_t time_msec) {
struct seatop_move_tiling_event *e = seat->seatop_data;
if (e->threshold_reached) {
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,
}
}
-static void handle_pointer_motion(struct sway_seat *seat, uint32_t time_msec,
- double dx, double dy) {
+static void handle_pointer_motion(struct sway_seat *seat, uint32_t time_msec) {
struct seatop_resize_floating_event *e = seat->seatop_data;
struct sway_container *con = e->con;
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,
}
}
-static void handle_pointer_motion(struct sway_seat *seat, uint32_t time_msec,
- double dx, double dy) {
+static void handle_pointer_motion(struct sway_seat *seat, uint32_t time_msec) {
struct seatop_resize_tiling_event *e = seat->seatop_data;
int amount_x = 0;
int amount_y = 0;