diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-09-16 10:22:01 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-16 10:22:01 -0400 |
commit | 456b91600d73edb3187c170eb6720b1c3212351c (patch) | |
tree | 318401a7a3c0e8f778d45e4ea26f5517e05191fa /sway/desktop | |
parent | Merge pull request #2641 from marienz/inhibit-crash (diff) | |
parent | Rename seat_get_active_child to seat_get_active_tiling_child (diff) | |
download | sway-456b91600d73edb3187c170eb6720b1c3212351c.tar.gz sway-456b91600d73edb3187c170eb6720b1c3212351c.tar.zst sway-456b91600d73edb3187c170eb6720b1c3212351c.zip |
Merge pull request #2637 from RyanDwyer/fix-tabbed-workspace-shenanigans
Make seat_get_active_child ignore floating children
Diffstat (limited to 'sway/desktop')
-rw-r--r-- | sway/desktop/output.c | 2 | ||||
-rw-r--r-- | sway/desktop/transaction.c | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/sway/desktop/output.c b/sway/desktop/output.c index a5db15cd..cfb5a710 100644 --- a/sway/desktop/output.c +++ b/sway/desktop/output.c | |||
@@ -232,7 +232,7 @@ static void scale_box(struct wlr_box *box, float scale) { | |||
232 | 232 | ||
233 | struct sway_workspace *output_get_active_workspace(struct sway_output *output) { | 233 | struct sway_workspace *output_get_active_workspace(struct sway_output *output) { |
234 | struct sway_seat *seat = input_manager_current_seat(input_manager); | 234 | struct sway_seat *seat = input_manager_current_seat(input_manager); |
235 | struct sway_node *focus = seat_get_active_child(seat, &output->node); | 235 | struct sway_node *focus = seat_get_active_tiling_child(seat, &output->node); |
236 | if (!focus) { | 236 | if (!focus) { |
237 | return output->workspaces->items[0]; | 237 | return output->workspaces->items[0]; |
238 | } | 238 | } |
diff --git a/sway/desktop/transaction.c b/sway/desktop/transaction.c index b4eec933..d747e279 100644 --- a/sway/desktop/transaction.c +++ b/sway/desktop/transaction.c | |||
@@ -176,7 +176,8 @@ static void copy_container_state(struct sway_container *container, | |||
176 | state->focused = seat_get_focus(seat) == &container->node; | 176 | state->focused = seat_get_focus(seat) == &container->node; |
177 | 177 | ||
178 | if (!container->view) { | 178 | if (!container->view) { |
179 | struct sway_node *focus = seat_get_active_child(seat, &container->node); | 179 | struct sway_node *focus = |
180 | seat_get_active_tiling_child(seat, &container->node); | ||
180 | state->focused_inactive_child = focus ? focus->sway_container : NULL; | 181 | state->focused_inactive_child = focus ? focus->sway_container : NULL; |
181 | } | 182 | } |
182 | } | 183 | } |