diff options
| author | Furkan Sahin <furkan-dev@proton.me> | 2019-12-15 19:09:26 -0500 |
|---|---|---|
| committer | Furkan Sahin <furkan-dev@proton.me> | 2019-12-15 19:09:26 -0500 |
| commit | 5686a3011c667e50622445cad62f786d0fb535a7 (patch) | |
| tree | 7c84928cd4d0de8ae3f3d24fa044437fe60fe5d1 | |
| parent | 047ec144ed89d9eb510abbe2a701c21287d75fd6 (diff) | |
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.
| -rw-r--r-- | sway/input/seatop_default.c | 3 |
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, state == WLR_BUTTON_PRESSED) { uint32_t btn_move = config->floating_mod_inverse ? BTN_RIGHT : BTN_LEFT; if (button == btn_move && (mod_pressed || on_titlebar)) { + seat_set_focus_container(seat, + seat_get_focus_inactive_view(seat, &cont->node)); while (cont->parent) { cont = cont->parent; } - seat_set_focus_container(seat, cont); seatop_begin_move_floating(seat, cont); return; } |
