diff options
-rw-r--r-- | sway/container.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sway/container.c b/sway/container.c index acce050f..6fbfa360 100644 --- a/sway/container.c +++ b/sway/container.c | |||
@@ -522,6 +522,7 @@ void set_view_visibility(swayc_t *view, void *data) { | |||
522 | } | 522 | } |
523 | bool visible = *(bool *)data; | 523 | bool visible = *(bool *)data; |
524 | if (view->type == C_VIEW) { | 524 | if (view->type == C_VIEW) { |
525 | wlc_view_set_output(view->handle, swayc_parent_by_type(view, C_OUTPUT)->handle); | ||
525 | wlc_view_set_mask(view->handle, visible ? VISIBLE : 0); | 526 | wlc_view_set_mask(view->handle, visible ? VISIBLE : 0); |
526 | if (visible) { | 527 | if (visible) { |
527 | wlc_view_bring_to_front(view->handle); | 528 | wlc_view_bring_to_front(view->handle); |
@@ -535,7 +536,7 @@ void set_view_visibility(swayc_t *view, void *data) { | |||
535 | 536 | ||
536 | void update_visibility(swayc_t *container) { | 537 | void update_visibility(swayc_t *container) { |
537 | swayc_t *ws = swayc_active_workspace_for(container); | 538 | swayc_t *ws = swayc_active_workspace_for(container); |
538 | bool visible = (ws->parent->focused == container); | 539 | bool visible = (ws->parent->focused == ws); |
539 | sway_log(L_DEBUG, "Setting visibility of container %p to %s", container, visible ? "visible" : "invisible"); | 540 | sway_log(L_DEBUG, "Setting visibility of container %p to %s", container, visible ? "visible" : "invisible"); |
540 | container_map(ws, set_view_visibility, &visible); | 541 | container_map(ws, set_view_visibility, &visible); |
541 | } | 542 | } |