aboutsummaryrefslogtreecommitdiffstats
path: root/sway/input/seatop_default.c
diff options
context:
space:
mode:
authorLibravatar Brian Ashworth <bosrsf04@gmail.com>2019-12-15 19:09:26 -0500
committerLibravatar Drew DeVault <sir@cmpwn.com>2019-12-16 12:02:05 -0500
commit2b51c5b2942fbedfe34a912b47616e98cfcea02e (patch)
tree7c84928cd4d0de8ae3f3d24fa044437fe60fe5d1 /sway/input/seatop_default.c
parentroot_scratchpad_hide: disable fullscreen descendants (diff)
downloadsway-2b51c5b2942fbedfe34a912b47616e98cfcea02e.tar.gz
sway-2b51c5b2942fbedfe34a912b47616e98cfcea02e.tar.zst
sway-2b51c5b2942fbedfe34a912b47616e98cfcea02e.zip
input/seatop_default: fix focusing floating titles
When clicking on the titlebar of a floating container (or descendant of a floating container), the top-level floating container was being focused and then allowing you to move the top-level floating container. This made it so you couldn't switch to a different tab/stack within the floating container. With this patch, the focus inactive view for the container that the titlebar is associated with is focused, then the traversal to the top-level floating container is performed to use with the move floating operation.
Diffstat (limited to 'sway/input/seatop_default.c')
-rw-r--r--sway/input/seatop_default.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sway/input/seatop_default.c b/sway/input/seatop_default.c
index 3768bc63..ffa43658 100644
--- a/sway/input/seatop_default.c
+++ b/sway/input/seatop_default.c
@@ -339,10 +339,11 @@ static void handle_button(struct sway_seat *seat, uint32_t time_msec,
339 state == WLR_BUTTON_PRESSED) { 339 state == WLR_BUTTON_PRESSED) {
340 uint32_t btn_move = config->floating_mod_inverse ? BTN_RIGHT : BTN_LEFT; 340 uint32_t btn_move = config->floating_mod_inverse ? BTN_RIGHT : BTN_LEFT;
341 if (button == btn_move && (mod_pressed || on_titlebar)) { 341 if (button == btn_move && (mod_pressed || on_titlebar)) {
342 seat_set_focus_container(seat,
343 seat_get_focus_inactive_view(seat, &cont->node));
342 while (cont->parent) { 344 while (cont->parent) {
343 cont = cont->parent; 345 cont = cont->parent;
344 } 346 }
345 seat_set_focus_container(seat, cont);
346 seatop_begin_move_floating(seat, cont); 347 seatop_begin_move_floating(seat, cont);
347 return; 348 return;
348 } 349 }