aboutsummaryrefslogtreecommitdiffstats
path: root/sway/tree/view.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/tree/view.c')
-rw-r--r--sway/tree/view.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sway/tree/view.c b/sway/tree/view.c
index 7a2c1950..b77a9bb2 100644
--- a/sway/tree/view.c
+++ b/sway/tree/view.c
@@ -531,7 +531,7 @@ static bool should_focus(struct sway_view *view) {
531 struct sway_container *parent = view->swayc->parent; 531 struct sway_container *parent = view->swayc->parent;
532 if (parent->type == C_WORKSPACE && prev_focus == parent) { 532 if (parent->type == C_WORKSPACE && prev_focus == parent) {
533 size_t num_children = parent->children->length + 533 size_t num_children = parent->children->length +
534 parent->sway_workspace->floating->children->length; 534 parent->sway_workspace->floating->length;
535 if (num_children == 1) { 535 if (num_children == 1) {
536 return true; 536 return true;
537 } 537 }
@@ -557,7 +557,7 @@ void view_map(struct sway_view *view, struct wlr_surface *wlr_surface) {
557 // If we're about to launch the view into the floating container, then 557 // If we're about to launch the view into the floating container, then
558 // launch it as a tiled view in the root of the workspace instead. 558 // launch it as a tiled view in the root of the workspace instead.
559 if (container_is_floating(target_sibling)) { 559 if (container_is_floating(target_sibling)) {
560 target_sibling = target_sibling->parent->parent; 560 target_sibling = target_sibling->parent;
561 } 561 }
562 562
563 view->swayc = container_view_create(target_sibling, view); 563 view->swayc = container_view_create(target_sibling, view);
@@ -1046,7 +1046,7 @@ bool view_is_visible(struct sway_view *view) {
1046 // Check view isn't in a tabbed or stacked container on an inactive tab 1046 // Check view isn't in a tabbed or stacked container on an inactive tab
1047 struct sway_seat *seat = input_manager_current_seat(input_manager); 1047 struct sway_seat *seat = input_manager_current_seat(input_manager);
1048 struct sway_container *container = view->swayc; 1048 struct sway_container *container = view->swayc;
1049 while (container->type != C_WORKSPACE && container->layout != L_FLOATING) { 1049 while (container->type != C_WORKSPACE) {
1050 if (container->parent->layout == L_TABBED || 1050 if (container->parent->layout == L_TABBED ||
1051 container->parent->layout == L_STACKED) { 1051 container->parent->layout == L_STACKED) {
1052 if (seat_get_active_child(seat, container->parent) != container) { 1052 if (seat_get_active_child(seat, container->parent) != container) {