input: remove motion deltas from seatop callbacks

Straightforward cleanup, they haven't been used for a while.
This commit is contained in:
Tudor Brindus 2020-10-31 17:56:21 -04:00 committed by Simon Ser
parent 96578aa91e
commit 8c12e71a66
9 changed files with 19 additions and 31 deletions

View file

@ -16,13 +16,12 @@ struct sway_seatop_impl {
void (*button)(struct sway_seat *seat, uint32_t time_msec, void (*button)(struct sway_seat *seat, uint32_t time_msec,
struct wlr_input_device *device, uint32_t button, struct wlr_input_device *device, uint32_t button,
enum wlr_button_state state); enum wlr_button_state state);
void (*pointer_motion)(struct sway_seat *seat, uint32_t time_msec, void (*pointer_motion)(struct sway_seat *seat, uint32_t time_msec);
double dx, double dy);
void (*pointer_axis)(struct sway_seat *seat, void (*pointer_axis)(struct sway_seat *seat,
struct wlr_event_pointer_axis *event); struct wlr_event_pointer_axis *event);
void (*rebase)(struct sway_seat *seat, uint32_t time_msec); void (*rebase)(struct sway_seat *seat, uint32_t time_msec);
void (*tablet_tool_motion)(struct sway_seat *seat, 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, void (*tablet_tool_tip)(struct sway_seat *seat, struct sway_tablet_tool *tool,
uint32_t time_msec, enum wlr_tablet_tool_tip_state state); uint32_t time_msec, enum wlr_tablet_tool_tip_state state);
void (*end)(struct sway_seat *seat); 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, struct wlr_input_device *device, uint32_t button,
enum wlr_button_state state); enum wlr_button_state state);
/** void seatop_pointer_motion(struct sway_seat *seat, uint32_t time_msec);
* 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_axis(struct sway_seat *seat, void seatop_pointer_axis(struct sway_seat *seat,
struct wlr_event_pointer_axis *event); 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); enum wlr_tablet_tool_tip_state state);
void seatop_tablet_tool_motion(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);
void seatop_rebase(struct sway_seat *seat, uint32_t time_msec); void seatop_rebase(struct sway_seat *seat, uint32_t time_msec);

View file

@ -359,7 +359,7 @@ static void pointer_motion(struct sway_cursor *cursor, uint32_t time_msec,
wlr_cursor_move(cursor->cursor, device, dx, dy); 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( 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 && if (!cursor->simulating_pointer_from_tool_tip &&
((surface && wlr_surface_accepts_tablet_v2(tablet->tablet_v2, surface)) || ((surface && wlr_surface_accepts_tablet_v2(tablet->tablet_v2, surface)) ||
wlr_tablet_tool_v2_has_implicit_grab(tool->tablet_v2_tool))) { 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 { } else {
wlr_tablet_v2_tablet_tool_notify_proximity_out(tool->tablet_v2_tool); 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); pointer_motion(cursor, time_msec, input_device->wlr_device, dx, dy, dx, dy);

View file

@ -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, void seatop_pointer_motion(struct sway_seat *seat, uint32_t time_msec) {
double dx, double dy) {
if (seat->seatop_impl->pointer_motion) { 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, 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) { 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 { } else {
seatop_pointer_motion(seat, time_msec, dx, dy); seatop_pointer_motion(seat, time_msec);
} }
} }

View file

@ -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, static void handle_pointer_motion(struct sway_seat *seat, uint32_t time_msec) {
double dx, double dy) {
struct seatop_default_event *e = seat->seatop_data; struct seatop_default_event *e = seat->seatop_data;
struct sway_cursor *cursor = seat->cursor; 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, 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 seatop_default_event *e = seat->seatop_data;
struct sway_cursor *cursor = seat->cursor; struct sway_cursor *cursor = seat->cursor;

View file

@ -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, static void handle_pointer_motion(struct sway_seat *seat, uint32_t time_msec) {
double dx, double dy) {
struct seatop_down_event *e = seat->seatop_data; struct seatop_down_event *e = seat->seatop_data;
struct sway_container *con = e->con; struct sway_container *con = e->con;
if (seat_is_input_allowed(seat, con->view->surface)) { 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, 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 seatop_down_event *e = seat->seatop_data;
struct sway_container *con = e->con; struct sway_container *con = e->con;
if (seat_is_input_allowed(seat, con->view->surface)) { if (seat_is_input_allowed(seat, con->view->surface)) {

View file

@ -34,8 +34,7 @@ static void handle_tablet_tool_tip(struct sway_seat *seat,
finalize_move(seat); finalize_move(seat);
} }
} }
static void handle_pointer_motion(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) {
struct seatop_move_floating_event *e = seat->seatop_data; struct seatop_move_floating_event *e = seat->seatop_data;
struct wlr_cursor *cursor = seat->cursor->cursor; struct wlr_cursor *cursor = seat->cursor->cursor;
desktop_damage_whole_container(e->con); desktop_damage_whole_container(e->con);

View file

@ -207,8 +207,7 @@ static void handle_motion_postthreshold(struct sway_seat *seat) {
desktop_damage_box(&e->drop_box); desktop_damage_box(&e->drop_box);
} }
static void handle_pointer_motion(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) {
struct seatop_move_tiling_event *e = seat->seatop_data; struct seatop_move_tiling_event *e = seat->seatop_data;
if (e->threshold_reached) { if (e->threshold_reached) {
handle_motion_postthreshold(seat); handle_motion_postthreshold(seat);

View file

@ -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, static void handle_pointer_motion(struct sway_seat *seat, uint32_t time_msec) {
double dx, double dy) {
struct seatop_resize_floating_event *e = seat->seatop_data; struct seatop_resize_floating_event *e = seat->seatop_data;
struct sway_container *con = e->con; struct sway_container *con = e->con;
enum wlr_edges edge = e->edge; enum wlr_edges edge = e->edge;

View file

@ -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, static void handle_pointer_motion(struct sway_seat *seat, uint32_t time_msec) {
double dx, double dy) {
struct seatop_resize_tiling_event *e = seat->seatop_data; struct seatop_resize_tiling_event *e = seat->seatop_data;
int amount_x = 0; int amount_x = 0;
int amount_y = 0; int amount_y = 0;