seat: set the handler_context in seatops

Ensures that the container operations which result from cursor
actions reference the right seat
This commit is contained in:
Ronan Pigott 2021-01-13 10:52:17 -07:00
parent 7023cb4f0d
commit 1ad4632ab0
3 changed files with 5 additions and 0 deletions

View file

@ -230,6 +230,7 @@ static void finalize_move(struct sway_seat *seat) {
seatop_begin_default(seat); seatop_begin_default(seat);
return; return;
} }
config->handler_context.seat = seat;
struct sway_container *con = e->con; struct sway_container *con = e->con;
struct sway_container *old_parent = con->parent; struct sway_container *old_parent = con->parent;

View file

@ -49,6 +49,8 @@ static void handle_pointer_motion(struct sway_seat *seat, uint32_t time_msec) {
mouse_move_y = 0; mouse_move_y = 0;
} }
config->handler_context.seat = seat;
double grow_width = edge & WLR_EDGE_LEFT ? -mouse_move_x : mouse_move_x; double grow_width = edge & WLR_EDGE_LEFT ? -mouse_move_x : mouse_move_x;
double grow_height = edge & WLR_EDGE_TOP ? -mouse_move_y : mouse_move_y; double grow_height = edge & WLR_EDGE_TOP ? -mouse_move_y : mouse_move_y;

View file

@ -93,6 +93,8 @@ static void handle_pointer_motion(struct sway_seat *seat, uint32_t time_msec) {
} }
} }
config->handler_context.seat = seat;
if (amount_x != 0) { if (amount_x != 0) {
container_resize_tiled(e->h_con, e->edge_x, amount_x); container_resize_tiled(e->h_con, e->edge_x, amount_x);
} }