diff options
author | Brian Ashworth <RedSoxFan@users.noreply.github.com> | 2018-05-12 12:43:34 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-12 12:43:34 -0400 |
commit | ec60e24f75f778b378206366057df4efae4b8630 (patch) | |
tree | a2b6ce2f6f28b294ae6cbb8cbf49b107138215f5 /sway/tree | |
parent | e3625d8f337d61c5d2ba1266679b9053168cd0ae (diff) | |
parent | b1c33ecc256c58c7ecee28e2f4507dd374727d62 (diff) |
Merge branch 'master' into edge-borders
Diffstat (limited to 'sway/tree')
-rw-r--r-- | sway/tree/view.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/sway/tree/view.c b/sway/tree/view.c index 5695a16b..ae8709ba 100644 --- a/sway/tree/view.c +++ b/sway/tree/view.c @@ -199,13 +199,15 @@ void view_set_fullscreen_raw(struct sway_view *view, bool fullscreen) { struct sway_container *focus, *focus_ws; wl_list_for_each(seat, &input_manager->seats, link) { focus = seat_get_focus(seat); - focus_ws = focus; - if (focus_ws->type != C_WORKSPACE) { - focus_ws = container_parent(focus_ws, C_WORKSPACE); - } - seat_set_focus(seat, view->swayc); - if (focus_ws != workspace) { - seat_set_focus(seat, focus); + if (focus) { + focus_ws = focus; + if (focus && focus_ws->type != C_WORKSPACE) { + focus_ws = container_parent(focus_ws, C_WORKSPACE); + } + seat_set_focus(seat, view->swayc); + if (focus_ws != workspace) { + seat_set_focus(seat, focus); + } } } } else { |