Fix workspace deletion edge cases

This commit is contained in:
Drew DeVault 2018-03-30 11:58:17 -04:00
parent 1c50d79e19
commit 49379dd0fc
11 changed files with 148 additions and 150 deletions

View file

@ -3,6 +3,7 @@
#include "sway/tree/container.h"
#include "sway/tree/layout.h"
#include "sway/tree/view.h"
#include "log.h"
const char *view_get_title(struct sway_view *view) {
if (view->iface.get_prop) {
@ -94,3 +95,13 @@ void view_update_outputs(struct sway_view *view, const struct wlr_box *before) {
}
}
}
struct sway_container *container_view_destroy(struct sway_container *view) {
if (!view) {
return NULL;
}
wlr_log(L_DEBUG, "Destroying view '%s'", view->name);
struct sway_container *parent = container_destroy(view);
arrange_windows(parent, -1, -1);
return parent;
}