diff options
author | 2018-05-11 01:20:20 +0000 | |
---|---|---|
committer | 2018-05-11 07:42:56 -0500 | |
commit | 935bda0f336bb9ca45a7fb96d7ed5f08ef04432f (patch) | |
tree | 44f348b09ec2f9f14ff399787cba3e228dd00b0f /sway | |
parent | Merge pull request #1948 from RyanDwyer/focus-parent-border (diff) | |
download | sway-935bda0f336bb9ca45a7fb96d7ed5f08ef04432f.tar.gz sway-935bda0f336bb9ca45a7fb96d7ed5f08ef04432f.tar.zst sway-935bda0f336bb9ca45a7fb96d7ed5f08ef04432f.zip |
fix crash on fullscreen toggle
Diffstat (limited to 'sway')
-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 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 { |