diff options
author | emersion <contact@emersion.fr> | 2018-03-30 19:04:06 -0400 |
---|---|---|
committer | emersion <contact@emersion.fr> | 2018-03-30 19:04:06 -0400 |
commit | 96656427656118f2e4d725359cc880270b0e51be (patch) | |
tree | e2596e9cfa113efa43f2a411176c31e6208a58b1 /sway/tree/view.c | |
parent | 6c9d67b1059409750de683aec3b8b9be2da987cc (diff) | |
parent | 1b88eaee6b14987c585fcf149cc26f665c584d77 (diff) | |
download | sway-96656427656118f2e4d725359cc880270b0e51be.tar.xz |
Merge branch 'wlroots' into client-cursors
Diffstat (limited to 'sway/tree/view.c')
-rw-r--r-- | sway/tree/view.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/sway/tree/view.c b/sway/tree/view.c index d5325c31..b7d1a41b 100644 --- a/sway/tree/view.c +++ b/sway/tree/view.c @@ -1,5 +1,7 @@ #include <wayland-server.h> #include <wlr/types/wlr_output_layout.h> +#include "log.h" +#include "sway/output.h" #include "sway/tree/container.h" #include "sway/tree/layout.h" #include "sway/tree/view.h" @@ -94,3 +96,28 @@ 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; +} + +void view_damage_whole(struct sway_view *view) { + struct sway_container *cont = NULL; + for (int i = 0; i < root_container.children->length; ++i) { + cont = root_container.children->items[i]; + if (cont->type == C_OUTPUT) { + output_damage_whole_view(cont->sway_output, view); + } + } +} + +void view_damage_from(struct sway_view *view) { + // TODO + view_damage_whole(view); +} |