diff --git a/sway/ipc-json.c b/sway/ipc-json.c index 2ae09457..9ba060a3 100644 --- a/sway/ipc-json.c +++ b/sway/ipc-json.c @@ -762,7 +762,8 @@ static void ipc_json_describe_container(struct sway_container *c, json_object *o json_object_object_add(object, "marks", marks); - if (c->view) { + // check if view exists and if it has not been unmapped + if (c->view && c->view->surface) { ipc_json_describe_view(c, object); } } diff --git a/sway/tree/container.c b/sway/tree/container.c index 576f5b5c..5f1e0cf6 100644 --- a/sway/tree/container.c +++ b/sway/tree/container.c @@ -90,7 +90,7 @@ struct sway_container *container_create(struct sway_view *view) { c->animation_present_timer = wl_event_loop_add_timer(server.wl_event_loop, animation_timer, c); // TODO: WON'T SPAWN IF LESS THAN 50, get optimal time (or use a signal?) - wl_event_source_timer_update(c->animation_present_timer, 50); + wl_event_source_timer_update(c->animation_present_timer, 200); wl_signal_emit_mutable(&root->events.new_node, &c->node); diff --git a/sway/tree/view.c b/sway/tree/view.c index d1bc6377..6ba34069 100644 --- a/sway/tree/view.c +++ b/sway/tree/view.c @@ -950,6 +950,7 @@ void view_unmap(struct sway_view *view) { // unfocus the view // look at handle_seat_node_destroy + wl_signal_emit_mutable(&view->container->node.events.destroy, &view->container->node); view_save_buffer(view); view->container->target_alpha = 0; wl_event_source_timer_update(view->container->animation_present_timer, 50);