diff options
author | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-09-11 16:56:05 +1000 |
---|---|---|
committer | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-09-11 16:56:05 +1000 |
commit | d4e80cf301d77f69370cc81657c433990986cfa6 (patch) | |
tree | 189c14237b1ce6f24af40d3e8bbc3e776e5f19c6 | |
parent | Merge pull request #2617 from wmww/cursor-enter-on-focus-change (diff) | |
download | sway-d4e80cf301d77f69370cc81657c433990986cfa6.tar.gz sway-d4e80cf301d77f69370cc81657c433990986cfa6.tar.zst sway-d4e80cf301d77f69370cc81657c433990986cfa6.zip |
Rename OP_MOVE to OP_MOVE_FLOATING
In preparation for introducing OP_MOVE_TILING.
-rw-r--r-- | include/sway/input/seat.h | 6 | ||||
-rw-r--r-- | sway/desktop/xdg_shell.c | 2 | ||||
-rw-r--r-- | sway/desktop/xdg_shell_v6.c | 2 | ||||
-rw-r--r-- | sway/desktop/xwayland.c | 2 | ||||
-rw-r--r-- | sway/input/cursor.c | 8 | ||||
-rw-r--r-- | sway/input/seat.c | 8 |
6 files changed, 14 insertions, 14 deletions
diff --git a/include/sway/input/seat.h b/include/sway/input/seat.h index b07d200d..1ae34be5 100644 --- a/include/sway/input/seat.h +++ b/include/sway/input/seat.h | |||
@@ -38,7 +38,7 @@ struct sway_drag_icon { | |||
38 | enum sway_seat_operation { | 38 | enum sway_seat_operation { |
39 | OP_NONE, | 39 | OP_NONE, |
40 | OP_DOWN, | 40 | OP_DOWN, |
41 | OP_MOVE, | 41 | OP_MOVE_FLOATING, |
42 | OP_RESIZE_FLOATING, | 42 | OP_RESIZE_FLOATING, |
43 | OP_RESIZE_TILING, | 43 | OP_RESIZE_TILING, |
44 | }; | 44 | }; |
@@ -172,8 +172,8 @@ void drag_icon_update_position(struct sway_drag_icon *icon); | |||
172 | void seat_begin_down(struct sway_seat *seat, struct sway_container *con, | 172 | void seat_begin_down(struct sway_seat *seat, struct sway_container *con, |
173 | uint32_t button, double sx, double sy); | 173 | uint32_t button, double sx, double sy); |
174 | 174 | ||
175 | void seat_begin_move(struct sway_seat *seat, struct sway_container *con, | 175 | void seat_begin_move_floating(struct sway_seat *seat, |
176 | uint32_t button); | 176 | struct sway_container *con, uint32_t button); |
177 | 177 | ||
178 | void seat_begin_resize_floating(struct sway_seat *seat, | 178 | void seat_begin_resize_floating(struct sway_seat *seat, |
179 | struct sway_container *con, uint32_t button, enum wlr_edges edge); | 179 | struct sway_container *con, uint32_t button, enum wlr_edges edge); |
diff --git a/sway/desktop/xdg_shell.c b/sway/desktop/xdg_shell.c index b9ca396a..00448be7 100644 --- a/sway/desktop/xdg_shell.c +++ b/sway/desktop/xdg_shell.c | |||
@@ -333,7 +333,7 @@ static void handle_request_move(struct wl_listener *listener, void *data) { | |||
333 | struct wlr_xdg_toplevel_move_event *e = data; | 333 | struct wlr_xdg_toplevel_move_event *e = data; |
334 | struct sway_seat *seat = e->seat->seat->data; | 334 | struct sway_seat *seat = e->seat->seat->data; |
335 | if (e->serial == seat->last_button_serial) { | 335 | if (e->serial == seat->last_button_serial) { |
336 | seat_begin_move(seat, view->container, seat->last_button); | 336 | seat_begin_move_floating(seat, view->container, seat->last_button); |
337 | } | 337 | } |
338 | } | 338 | } |
339 | 339 | ||
diff --git a/sway/desktop/xdg_shell_v6.c b/sway/desktop/xdg_shell_v6.c index 0c121adc..d2c9a68b 100644 --- a/sway/desktop/xdg_shell_v6.c +++ b/sway/desktop/xdg_shell_v6.c | |||
@@ -330,7 +330,7 @@ static void handle_request_move(struct wl_listener *listener, void *data) { | |||
330 | struct wlr_xdg_toplevel_v6_move_event *e = data; | 330 | struct wlr_xdg_toplevel_v6_move_event *e = data; |
331 | struct sway_seat *seat = e->seat->seat->data; | 331 | struct sway_seat *seat = e->seat->seat->data; |
332 | if (e->serial == seat->last_button_serial) { | 332 | if (e->serial == seat->last_button_serial) { |
333 | seat_begin_move(seat, view->container, seat->last_button); | 333 | seat_begin_move_floating(seat, view->container, seat->last_button); |
334 | } | 334 | } |
335 | } | 335 | } |
336 | 336 | ||
diff --git a/sway/desktop/xwayland.c b/sway/desktop/xwayland.c index 6761b6bc..3619f202 100644 --- a/sway/desktop/xwayland.c +++ b/sway/desktop/xwayland.c | |||
@@ -449,7 +449,7 @@ static void handle_request_move(struct wl_listener *listener, void *data) { | |||
449 | return; | 449 | return; |
450 | } | 450 | } |
451 | struct sway_seat *seat = input_manager_current_seat(input_manager); | 451 | struct sway_seat *seat = input_manager_current_seat(input_manager); |
452 | seat_begin_move(seat, view->container, seat->last_button); | 452 | seat_begin_move_floating(seat, view->container, seat->last_button); |
453 | } | 453 | } |
454 | 454 | ||
455 | static void handle_request_resize(struct wl_listener *listener, void *data) { | 455 | static void handle_request_resize(struct wl_listener *listener, void *data) { |
diff --git a/sway/input/cursor.c b/sway/input/cursor.c index 69a019bb..cd87e976 100644 --- a/sway/input/cursor.c +++ b/sway/input/cursor.c | |||
@@ -218,7 +218,7 @@ static void handle_down_motion(struct sway_seat *seat, | |||
218 | seat->op_moved = true; | 218 | seat->op_moved = true; |
219 | } | 219 | } |
220 | 220 | ||
221 | static void handle_move_motion(struct sway_seat *seat, | 221 | static void handle_move_floating_motion(struct sway_seat *seat, |
222 | struct sway_cursor *cursor) { | 222 | struct sway_cursor *cursor) { |
223 | struct sway_container *con = seat->op_container; | 223 | struct sway_container *con = seat->op_container; |
224 | desktop_damage_whole_container(con); | 224 | desktop_damage_whole_container(con); |
@@ -402,8 +402,8 @@ void cursor_send_pointer_motion(struct sway_cursor *cursor, uint32_t time_msec, | |||
402 | case OP_DOWN: | 402 | case OP_DOWN: |
403 | handle_down_motion(seat, cursor, time_msec); | 403 | handle_down_motion(seat, cursor, time_msec); |
404 | break; | 404 | break; |
405 | case OP_MOVE: | 405 | case OP_MOVE_FLOATING: |
406 | handle_move_motion(seat, cursor); | 406 | handle_move_floating_motion(seat, cursor); |
407 | break; | 407 | break; |
408 | case OP_RESIZE_FLOATING: | 408 | case OP_RESIZE_FLOATING: |
409 | handle_resize_floating_motion(seat, cursor); | 409 | handle_resize_floating_motion(seat, cursor); |
@@ -719,7 +719,7 @@ void dispatch_cursor_button(struct sway_cursor *cursor, | |||
719 | while (cont->parent) { | 719 | while (cont->parent) { |
720 | cont = cont->parent; | 720 | cont = cont->parent; |
721 | } | 721 | } |
722 | seat_begin_move(seat, cont, button); | 722 | seat_begin_move_floating(seat, cont, button); |
723 | return; | 723 | return; |
724 | } | 724 | } |
725 | } | 725 | } |
diff --git a/sway/input/seat.c b/sway/input/seat.c index 5709a7f7..a908560a 100644 --- a/sway/input/seat.c +++ b/sway/input/seat.c | |||
@@ -963,13 +963,13 @@ void seat_begin_down(struct sway_seat *seat, struct sway_container *con, | |||
963 | seat->op_moved = false; | 963 | seat->op_moved = false; |
964 | } | 964 | } |
965 | 965 | ||
966 | void seat_begin_move(struct sway_seat *seat, struct sway_container *con, | 966 | void seat_begin_move_floating(struct sway_seat *seat, |
967 | uint32_t button) { | 967 | struct sway_container *con, uint32_t button) { |
968 | if (!seat->cursor) { | 968 | if (!seat->cursor) { |
969 | wlr_log(WLR_DEBUG, "Ignoring move request due to no cursor device"); | 969 | wlr_log(WLR_DEBUG, "Ignoring move request due to no cursor device"); |
970 | return; | 970 | return; |
971 | } | 971 | } |
972 | seat->operation = OP_MOVE; | 972 | seat->operation = OP_MOVE_FLOATING; |
973 | seat->op_container = con; | 973 | seat->op_container = con; |
974 | seat->op_button = button; | 974 | seat->op_button = button; |
975 | cursor_set_image(seat->cursor, "grab", NULL); | 975 | cursor_set_image(seat->cursor, "grab", NULL); |
@@ -1017,7 +1017,7 @@ void seat_begin_resize_tiling(struct sway_seat *seat, | |||
1017 | 1017 | ||
1018 | void seat_end_mouse_operation(struct sway_seat *seat) { | 1018 | void seat_end_mouse_operation(struct sway_seat *seat) { |
1019 | enum sway_seat_operation operation = seat->operation; | 1019 | enum sway_seat_operation operation = seat->operation; |
1020 | if (seat->operation == OP_MOVE) { | 1020 | if (seat->operation == OP_MOVE_FLOATING) { |
1021 | // We "move" the container to its own location so it discovers its | 1021 | // We "move" the container to its own location so it discovers its |
1022 | // output again. | 1022 | // output again. |
1023 | struct sway_container *con = seat->op_container; | 1023 | struct sway_container *con = seat->op_container; |