aboutsummaryrefslogtreecommitdiffstats
path: root/sway/input/seatop_default.c
diff options
context:
space:
mode:
authorLibravatar Tudor Brindus <me@tbrindus.ca>2022-10-09 21:15:41 -0400
committerLibravatar Simon Ser <contact@emersion.fr>2022-10-10 08:55:21 +0200
commit09354db8786a1d3cf269a55f8f854df863019a46 (patch)
treea052d79aa58c70ee780b92318172a17b0fd3b103 /sway/input/seatop_default.c
parentUse keyboard_state.focused_surface directly (diff)
downloadsway-09354db8786a1d3cf269a55f8f854df863019a46.tar.gz
sway-09354db8786a1d3cf269a55f8f854df863019a46.tar.zst
sway-09354db8786a1d3cf269a55f8f854df863019a46.zip
input: focus floating container when clicked on border
Fixes #7209.
Diffstat (limited to 'sway/input/seatop_default.c')
-rw-r--r--sway/input/seatop_default.c2
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,
446 state == WLR_BUTTON_PRESSED) { 446 state == WLR_BUTTON_PRESSED) {
447 // Via border 447 // Via border
448 if (button == BTN_LEFT && resize_edge != WLR_EDGE_NONE) { 448 if (button == BTN_LEFT && resize_edge != WLR_EDGE_NONE) {
449 seat_set_focus_container(seat, cont);
449 seatop_begin_resize_floating(seat, cont, resize_edge); 450 seatop_begin_resize_floating(seat, cont, resize_edge);
450 return; 451 return;
451 } 452 }
@@ -460,6 +461,7 @@ static void handle_button(struct sway_seat *seat, uint32_t time_msec,
460 WLR_EDGE_RIGHT : WLR_EDGE_LEFT; 461 WLR_EDGE_RIGHT : WLR_EDGE_LEFT;
461 edge |= cursor->cursor->y > floater->pending.y + floater->pending.height / 2 ? 462 edge |= cursor->cursor->y > floater->pending.y + floater->pending.height / 2 ?
462 WLR_EDGE_BOTTOM : WLR_EDGE_TOP; 463 WLR_EDGE_BOTTOM : WLR_EDGE_TOP;
464 seat_set_focus_container(seat, floater);
463 seatop_begin_resize_floating(seat, floater, edge); 465 seatop_begin_resize_floating(seat, floater, edge);
464 return; 466 return;
465 } 467 }