diff options
-rw-r--r-- | sway/handlers.c | 1 | ||||
-rw-r--r-- | sway/layout.c | 3 |
2 files changed, 2 insertions, 2 deletions
diff --git a/sway/handlers.c b/sway/handlers.c index 0157d466..ebfd22ad 100644 --- a/sway/handlers.c +++ b/sway/handlers.c | |||
@@ -168,7 +168,6 @@ static bool handle_view_created(wlc_handle handle) { | |||
168 | static void handle_view_destroyed(wlc_handle handle) { | 168 | static void handle_view_destroyed(wlc_handle handle) { |
169 | sway_log(L_DEBUG, "Destroying window %lu", handle); | 169 | sway_log(L_DEBUG, "Destroying window %lu", handle); |
170 | swayc_t *view = get_swayc_for_handle(handle, &root_container); | 170 | swayc_t *view = get_swayc_for_handle(handle, &root_container); |
171 | swayc_t *focused = get_focused_container(&root_container); | ||
172 | 171 | ||
173 | switch (wlc_view_get_type(handle)) { | 172 | switch (wlc_view_get_type(handle)) { |
174 | //regular view created regularly | 173 | //regular view created regularly |
diff --git a/sway/layout.c b/sway/layout.c index 8ff5c4b7..d072c410 100644 --- a/sway/layout.c +++ b/sway/layout.c | |||
@@ -226,7 +226,8 @@ void arrange_windows(swayc_t *container, int width, int height) { | |||
226 | // will be kept up to date so that more recently focused views | 226 | // will be kept up to date so that more recently focused views |
227 | // have higher indexes | 227 | // have higher indexes |
228 | // This is conditional on there not being a fullscreen view in the workspace | 228 | // This is conditional on there not being a fullscreen view in the workspace |
229 | if (!(wlc_view_get_state(container->focused->handle) & WLC_BIT_FULLSCREEN)) { | 229 | if (!container->focused |
230 | || !(wlc_view_get_state(container->focused->handle) & WLC_BIT_FULLSCREEN)) { | ||
230 | wlc_view_bring_to_front(view->handle); | 231 | wlc_view_bring_to_front(view->handle); |
231 | } | 232 | } |
232 | } | 233 | } |