aboutsummaryrefslogtreecommitdiffstats
path: root/sway/input/cursor.c
diff options
context:
space:
mode:
authorLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-08-16 09:12:48 +1000
committerLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-08-18 09:18:32 +1000
commitb637b61a7a25219991280717d9bf8a463ed4d8a8 (patch)
treeb8b0d0d5e7a13f354ede4c19746f1ebd6042f8a3 /sway/input/cursor.c
parentImplement mousedown operation (diff)
downloadsway-b637b61a7a25219991280717d9bf8a463ed4d8a8.tar.gz
sway-b637b61a7a25219991280717d9bf8a463ed4d8a8.tar.zst
sway-b637b61a7a25219991280717d9bf8a463ed4d8a8.zip
Rename mousedown to down and make seat operation a named enum
Diffstat (limited to 'sway/input/cursor.c')
-rw-r--r--sway/input/cursor.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sway/input/cursor.c b/sway/input/cursor.c
index bd0030f0..5a2743e3 100644
--- a/sway/input/cursor.c
+++ b/sway/input/cursor.c
@@ -215,7 +215,7 @@ static enum wlr_edges find_resize_edge(struct sway_container *cont,
215 return edge; 215 return edge;
216} 216}
217 217
218static void handle_mousedown_motion(struct sway_seat *seat, 218static void handle_down_motion(struct sway_seat *seat,
219 struct sway_cursor *cursor, uint32_t time_msec) { 219 struct sway_cursor *cursor, uint32_t time_msec) {
220 struct sway_container *con = seat->op_container; 220 struct sway_container *con = seat->op_container;
221 if (seat_is_input_allowed(seat, con->sway_view->surface)) { 221 if (seat_is_input_allowed(seat, con->sway_view->surface)) {
@@ -409,8 +409,8 @@ void cursor_send_pointer_motion(struct sway_cursor *cursor, uint32_t time_msec,
409 409
410 if (seat->operation != OP_NONE) { 410 if (seat->operation != OP_NONE) {
411 switch (seat->operation) { 411 switch (seat->operation) {
412 case OP_MOUSEDOWN: 412 case OP_DOWN:
413 handle_mousedown_motion(seat, cursor, time_msec); 413 handle_down_motion(seat, cursor, time_msec);
414 break; 414 break;
415 case OP_MOVE: 415 case OP_MOVE:
416 handle_move_motion(seat, cursor); 416 handle_move_motion(seat, cursor);
@@ -762,7 +762,7 @@ void dispatch_cursor_button(struct sway_cursor *cursor,
762 if (surface && cont && state == WLR_BUTTON_PRESSED) { 762 if (surface && cont && state == WLR_BUTTON_PRESSED) {
763 seat_set_focus(seat, cont); 763 seat_set_focus(seat, cont);
764 seat_pointer_notify_button(seat, time_msec, button, state); 764 seat_pointer_notify_button(seat, time_msec, button, state);
765 seat_begin_mousedown(seat, cont, button, sx, sy); 765 seat_begin_down(seat, cont, button, sx, sy);
766 return; 766 return;
767 } 767 }
768 768