diff options
author | Tudor Brindus <me@tbrindus.ca> | 2022-10-09 21:15:41 -0400 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2022-10-10 08:55:21 +0200 |
commit | 09354db8786a1d3cf269a55f8f854df863019a46 (patch) | |
tree | a052d79aa58c70ee780b92318172a17b0fd3b103 /sway/input | |
parent | 99acdb4e62685ae618d79c6d4e735eee890947e6 (diff) | |
download | sway-09354db8786a1d3cf269a55f8f854df863019a46.tar.xz |
input: focus floating container when clicked on border
Fixes #7209.
Diffstat (limited to 'sway/input')
-rw-r--r-- | sway/input/seatop_default.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sway/input/seatop_default.c b/sway/input/seatop_default.c index 875426bf..3421cf1a 100644 --- a/sway/input/seatop_default.c +++ b/sway/input/seatop_default.c @@ -446,6 +446,7 @@ static void handle_button(struct sway_seat *seat, uint32_t time_msec, state == WLR_BUTTON_PRESSED) { // Via border if (button == BTN_LEFT && resize_edge != WLR_EDGE_NONE) { + seat_set_focus_container(seat, cont); seatop_begin_resize_floating(seat, cont, resize_edge); return; } @@ -460,6 +461,7 @@ static void handle_button(struct sway_seat *seat, uint32_t time_msec, WLR_EDGE_RIGHT : WLR_EDGE_LEFT; edge |= cursor->cursor->y > floater->pending.y + floater->pending.height / 2 ? WLR_EDGE_BOTTOM : WLR_EDGE_TOP; + seat_set_focus_container(seat, floater); seatop_begin_resize_floating(seat, floater, edge); return; } |