diff options
author | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-08-16 09:12:48 +1000 |
---|---|---|
committer | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-08-18 09:18:32 +1000 |
commit | b637b61a7a25219991280717d9bf8a463ed4d8a8 (patch) | |
tree | b8b0d0d5e7a13f354ede4c19746f1ebd6042f8a3 /sway/input/seat.c | |
parent | a36625a482585e86d465df1eaa3669c1c4390a20 (diff) |
Rename mousedown to down and make seat operation a named enum
Diffstat (limited to 'sway/input/seat.c')
-rw-r--r-- | sway/input/seat.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sway/input/seat.c b/sway/input/seat.c index 045bf91a..cc7c28d8 100644 --- a/sway/input/seat.c +++ b/sway/input/seat.c @@ -954,9 +954,9 @@ struct seat_config *seat_get_config(struct sway_seat *seat) { return NULL; } -void seat_begin_mousedown(struct sway_seat *seat, struct sway_container *con, +void seat_begin_down(struct sway_seat *seat, struct sway_container *con, uint32_t button, double sx, double sy) { - seat->operation = OP_MOUSEDOWN; + seat->operation = OP_DOWN; seat->op_container = con; seat->op_button = button; seat->op_ref_lx = seat->cursor->cursor->x; @@ -1018,7 +1018,7 @@ void seat_begin_resize_tiling(struct sway_seat *seat, } void seat_end_mouse_operation(struct sway_seat *seat) { - int operation = seat->operation; + enum sway_seat_operation operation = seat->operation; if (seat->operation == OP_MOVE) { // We "move" the container to its own location so it discovers its // output again. @@ -1027,7 +1027,7 @@ void seat_end_mouse_operation(struct sway_seat *seat) { } seat->operation = OP_NONE; seat->op_container = NULL; - if (operation == OP_MOUSEDOWN) { + if (operation == OP_DOWN) { // Set the cursor's previous coords to the x/y at the start of the // operation, so the container change will be detected if using // focus_follows_mouse and the cursor moved off the original container |