mirror of
https://github.com/swaywm/sway.git
synced 2025-10-29 05:40:18 -04:00
container: Move pending state to state struct
Pending state is currently inlined directly in the container struct, while the current state is in a state struct. A side-effect of this is that it is not immediately obvious that pending double-buffered state is accessed, nor is it obvious what state is double-buffered. Instead, use the state struct for both current and pending.
This commit is contained in:
parent
28cadf5580
commit
a047b5ee4a
33 changed files with 723 additions and 757 deletions
|
|
@ -15,7 +15,7 @@ static void finalize_move(struct sway_seat *seat) {
|
|||
|
||||
// We "move" the container to its own location
|
||||
// so it discovers its output again.
|
||||
container_floating_move_to(e->con, e->con->x, e->con->y);
|
||||
container_floating_move_to(e->con, e->con->pending.x, e->con->pending.y);
|
||||
transaction_commit_dirty();
|
||||
|
||||
seatop_begin_default(seat);
|
||||
|
|
@ -70,8 +70,8 @@ void seatop_begin_move_floating(struct sway_seat *seat,
|
|||
return;
|
||||
}
|
||||
e->con = con;
|
||||
e->dx = cursor->cursor->x - con->x;
|
||||
e->dy = cursor->cursor->y - con->y;
|
||||
e->dx = cursor->cursor->x - con->pending.x;
|
||||
e->dy = cursor->cursor->y - con->pending.y;
|
||||
|
||||
seat->seatop_impl = &seatop_impl;
|
||||
seat->seatop_data = e;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue