diff options
author | Kenny Levinsen <kl@kl.wtf> | 2021-02-12 23:22:51 +0100 |
---|---|---|
committer | Tudor Brindus <me@tbrindus.ca> | 2021-02-16 22:05:00 -0500 |
commit | a047b5ee4a2a67d30d93641ff86531d54b8e0879 (patch) | |
tree | 271666c6254e4fabf943c1153224059411a5ce56 /sway/input/seatop_move_floating.c | |
parent | 28cadf558090854ace1df1a0a64f5fbc059541c0 (diff) |
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.
Diffstat (limited to 'sway/input/seatop_move_floating.c')
-rw-r--r-- | sway/input/seatop_move_floating.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sway/input/seatop_move_floating.c b/sway/input/seatop_move_floating.c index 6683be21..ddcd4c53 100644 --- a/sway/input/seatop_move_floating.c +++ b/sway/input/seatop_move_floating.c @@ -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; |