diff options
Diffstat (limited to 'sway/handlers.c')
-rw-r--r-- | sway/handlers.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sway/handlers.c b/sway/handlers.c index 2a5113cc..24e8e014 100644 --- a/sway/handlers.c +++ b/sway/handlers.c | |||
@@ -38,6 +38,9 @@ static bool pointer_test(swayc_t *view, void *_origin) { | |||
38 | 38 | ||
39 | swayc_t *container_under_pointer(void) { | 39 | swayc_t *container_under_pointer(void) { |
40 | //root.output->workspace | 40 | //root.output->workspace |
41 | if (!root_container.focused || !root_container.focused->focused) { | ||
42 | return NULL; | ||
43 | } | ||
41 | swayc_t *lookup = root_container.focused->focused; | 44 | swayc_t *lookup = root_container.focused->focused; |
42 | //Case of empty workspace | 45 | //Case of empty workspace |
43 | if (lookup->children == 0) { | 46 | if (lookup->children == 0) { |
@@ -174,9 +177,6 @@ static void handle_view_destroyed(wlc_handle handle) { | |||
174 | if (view) { | 177 | if (view) { |
175 | swayc_t *parent = destroy_view(view); | 178 | swayc_t *parent = destroy_view(view); |
176 | arrange_windows(parent, -1, -1); | 179 | arrange_windows(parent, -1, -1); |
177 | if (!focused || focused == view) { | ||
178 | set_focused_container(container_under_pointer()); | ||
179 | } | ||
180 | } | 180 | } |
181 | break; | 181 | break; |
182 | //takes keyboard focus | 182 | //takes keyboard focus |