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.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/sway/tree/view.c b/sway/tree/view.c
index afd7eade..424c1084 100644
--- a/sway/tree/view.c
+++ b/sway/tree/view.c
@@ -163,13 +163,15 @@ void view_set_fullscreen_raw(struct sway_view *view, bool fullscreen) {
163 struct sway_container *focus, *focus_ws; 163 struct sway_container *focus, *focus_ws;
164 wl_list_for_each(seat, &input_manager->seats, link) { 164 wl_list_for_each(seat, &input_manager->seats, link) {
165 focus = seat_get_focus(seat); 165 focus = seat_get_focus(seat);
166 focus_ws = focus; 166 if (focus) {
167 if (focus_ws->type != C_WORKSPACE) { 167 focus_ws = focus;
168 focus_ws = container_parent(focus_ws, C_WORKSPACE); 168 if (focus && focus_ws->type != C_WORKSPACE) {
169 } 169 focus_ws = container_parent(focus_ws, C_WORKSPACE);
170 seat_set_focus(seat, view->swayc); 170 }
171 if (focus_ws != workspace) { 171 seat_set_focus(seat, view->swayc);
172 seat_set_focus(seat, focus); 172 if (focus_ws != workspace) {
173 seat_set_focus(seat, focus);
174 }
173 } 175 }
174 } 176 }
175 } else { 177 } else {