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 | |
parent | Merge pull request #1953 from RyanDwyer/criteria-focused (diff) | |
parent | Merge branch 'master' into fix-crash-on-fullscreen (diff) | |
download | sway-7f03570caf747b07f8da28e58cc8074f4f6bc33d.tar.gz sway-7f03570caf747b07f8da28e58cc8074f4f6bc33d.tar.zst sway-7f03570caf747b07f8da28e58cc8074f4f6bc33d.zip |
Merge pull request #1952 from Dudemanguy911/fix-crash-on-fullscreen
fix crash on fullscreen toggle
-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) { | |||
188 | struct sway_container *focus, *focus_ws; | 188 | struct sway_container *focus, *focus_ws; |
189 | wl_list_for_each(seat, &input_manager->seats, link) { | 189 | wl_list_for_each(seat, &input_manager->seats, link) { |
190 | focus = seat_get_focus(seat); | 190 | focus = seat_get_focus(seat); |
191 | focus_ws = focus; | 191 | if (focus) { |
192 | if (focus_ws->type != C_WORKSPACE) { | 192 | focus_ws = focus; |
193 | focus_ws = container_parent(focus_ws, C_WORKSPACE); | 193 | if (focus && focus_ws->type != C_WORKSPACE) { |
194 | } | 194 | focus_ws = container_parent(focus_ws, C_WORKSPACE); |
195 | seat_set_focus(seat, view->swayc); | 195 | } |
196 | if (focus_ws != workspace) { | 196 | seat_set_focus(seat, view->swayc); |
197 | seat_set_focus(seat, focus); | 197 | if (focus_ws != workspace) { |
198 | seat_set_focus(seat, focus); | ||
199 | } | ||
198 | } | 200 | } |
199 | } | 201 | } |
200 | } else { | 202 | } else { |