aboutsummaryrefslogtreecommitdiff
path: root/sway/desktop
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2018-08-28 20:49:14 -0400
committerGitHub <noreply@github.com>2018-08-28 20:49:14 -0400
commit095ca7576918f3ad46113529ff9369a5be9ae70c (patch)
treed82c74c736bfb0f9d86f6449f43006e1ea6344d8 /sway/desktop
parent602ccca1a86a6a8611a287a09feeade17bccfa7c (diff)
parent53fe7b02e9787e8a08dbc4d132e8bde836647a9e (diff)
Merge pull request #2533 from RyanDwyer/fix-workspace-tabs
Fix workspace tabs
Diffstat (limited to 'sway/desktop')
-rw-r--r--sway/desktop/transaction.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/sway/desktop/transaction.c b/sway/desktop/transaction.c
index c18529fb..862ffee8 100644
--- a/sway/desktop/transaction.c
+++ b/sway/desktop/transaction.c
@@ -122,7 +122,17 @@ static void copy_pending_state(struct sway_container *container,
struct sway_seat *seat = input_manager_current_seat(input_manager);
state->focused = seat_get_focus(seat) == container;
- if (container->type != C_VIEW) {
+ if (container->type == C_WORKSPACE) {
+ // Set focused_inactive_child to the direct tiling child
+ struct sway_container *focus =
+ seat_get_focus_inactive_tiling(seat, container);
+ if (focus && focus->type == C_CONTAINER) {
+ while (focus->parent->type != C_WORKSPACE) {
+ focus = focus->parent;
+ }
+ }
+ state->focused_inactive_child = focus;
+ } else if (container->type != C_VIEW) {
state->focused_inactive_child =
seat_get_active_child(seat, container);
}