diff options
author | Ryan Dwyer <[email protected]> | 2018-07-21 10:40:12 +1000 |
---|---|---|
committer | Ryan Dwyer <[email protected]> | 2018-07-22 23:10:19 +1000 |
commit | 0c87bff5d1ce686afdc25d37eee4bdd8f08abdd3 (patch) | |
tree | ab1b5be08daccc0e92ebff7497687b252fa5f5dc /sway/input/cursor.c | |
parent | 86f55315113556eaa58f8b06231a89d67b1201ba (diff) |
Replace static handle_end_operation with seat_end_mouse_operation
Diffstat (limited to 'sway/input/cursor.c')
-rw-r--r-- | sway/input/cursor.c | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/sway/input/cursor.c b/sway/input/cursor.c index 8b9208c6..ec83746e 100644 --- a/sway/input/cursor.c +++ b/sway/input/cursor.c @@ -427,21 +427,6 @@ static void handle_cursor_motion_absolute( transaction_commit_dirty(); } -static void handle_end_operation(struct sway_seat *seat) { - if (seat->operation == OP_MOVE) { - // We "move" the container to its own location so it discovers its - // output again. - struct sway_container *con = seat->op_container; - container_floating_move_to(con, con->x, con->y); - seat->operation = OP_NONE; - seat->op_container = NULL; - } else { - // OP_RESIZE - seat->operation = OP_NONE; - seat->op_container = NULL; - } -} - static void dispatch_cursor_button_floating(struct sway_cursor *cursor, uint32_t time_msec, uint32_t button, enum wlr_button_state state, struct wlr_surface *surface, double sx, double sy, @@ -484,7 +469,7 @@ void dispatch_cursor_button(struct sway_cursor *cursor, uint32_t time_msec, uint32_t button, enum wlr_button_state state) { if (cursor->seat->operation != OP_NONE && button == cursor->seat->op_button && state == WLR_BUTTON_RELEASED) { - handle_end_operation(cursor->seat); + seat_end_mouse_operation(cursor->seat); return; } if (time_msec == 0) { |