summaryrefslogtreecommitdiffstats
path: root/sway/tree/view.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/tree/view.c')
-rw-r--r--sway/tree/view.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sway/tree/view.c b/sway/tree/view.c
index 051b93ce..97318daa 100644
--- a/sway/tree/view.c
+++ b/sway/tree/view.c
@@ -496,7 +496,7 @@ static struct sway_container *select_workspace(struct sway_view *view) {
496 } 496 }
497 497
498 // Use the focused workspace 498 // Use the focused workspace
499 ws = seat_get_focus(seat); 499 ws = seat_get_focus_inactive(seat, &root_container);
500 if (ws->type != C_WORKSPACE) { 500 if (ws->type != C_WORKSPACE) {
501 ws = container_parent(ws, C_WORKSPACE); 501 ws = container_parent(ws, C_WORKSPACE);
502 } 502 }
@@ -505,7 +505,8 @@ static struct sway_container *select_workspace(struct sway_view *view) {
505 505
506static bool should_focus(struct sway_view *view) { 506static bool should_focus(struct sway_view *view) {
507 struct sway_seat *seat = input_manager_current_seat(input_manager); 507 struct sway_seat *seat = input_manager_current_seat(input_manager);
508 struct sway_container *prev_focus = seat_get_focus(seat); 508 struct sway_container *prev_focus =
509 seat_get_focus_inactive(seat, &root_container);
509 struct sway_container *prev_ws = prev_focus->type == C_WORKSPACE ? 510 struct sway_container *prev_ws = prev_focus->type == C_WORKSPACE ?
510 prev_focus : container_parent(prev_focus, C_WORKSPACE); 511 prev_focus : container_parent(prev_focus, C_WORKSPACE);
511 struct sway_container *map_ws = container_parent(view->swayc, C_WORKSPACE); 512 struct sway_container *map_ws = container_parent(view->swayc, C_WORKSPACE);