mirror of
https://github.com/swaywm/sway.git
synced 2025-11-21 06:59:48 -05:00
Replace static handle_end_operation with seat_end_mouse_operation
This commit is contained in:
parent
86f5531511
commit
0c87bff5d1
4 changed files with 23 additions and 18 deletions
|
|
@ -932,3 +932,22 @@ void seat_begin_resize(struct sway_seat *seat, struct sway_container *con,
|
|||
seat->op_ref_width = con->width;
|
||||
seat->op_ref_height = con->height;
|
||||
}
|
||||
|
||||
void seat_end_mouse_operation(struct sway_seat *seat) {
|
||||
switch (seat->operation) {
|
||||
case 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);
|
||||
}
|
||||
case OP_RESIZE:
|
||||
// Don't need to do anything here.
|
||||
break;
|
||||
case OP_NONE:
|
||||
break;
|
||||
}
|
||||
seat->operation = OP_NONE;
|
||||
seat->op_container = NULL;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue