diff options
author | Ryan Dwyer <RyanDwyer@users.noreply.github.com> | 2018-05-12 18:00:29 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-12 18:00:29 +1000 |
commit | 7f03570caf747b07f8da28e58cc8074f4f6bc33d (patch) | |
tree | fa511907ae4ca82d8ca68cc3a2be254359af091f /sway/tree | |
parent | 2511adffc29996b64d01d85b3de31de9a2af9096 (diff) | |
parent | 4717c71da54a45f736bdfde04ee3f0db88918799 (diff) | |
download | sway-7f03570caf747b07f8da28e58cc8074f4f6bc33d.tar.xz |
Merge pull request #1952 from Dudemanguy911/fix-crash-on-fullscreen
fix crash on fullscreen toggle
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 ca84d82e..3b3b6eaf 100644 --- a/sway/tree/view.c +++ b/sway/tree/view.c @@ -188,13 +188,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 { |