aboutsummaryrefslogtreecommitdiff
path: root/sway/tree/view.c
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2018-03-30 18:53:36 -0400
committerGitHub <noreply@github.com>2018-03-30 18:53:36 -0400
commit1b88eaee6b14987c585fcf149cc26f665c584d77 (patch)
tree047052218c4f19701f29c4e5547856f445670c5b /sway/tree/view.c
parente6fa7a722e9329b1e61ff2977ae715da3c2d9c9b (diff)
parent139f80b0f03cd772e408604203df81f285ca3f67 (diff)
Merge pull request #1665 from emersion/damage-tracking-lite
Add lite damage tracking
Diffstat (limited to 'sway/tree/view.c')
-rw-r--r--sway/tree/view.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/sway/tree/view.c b/sway/tree/view.c
index 480ff693..b7d1a41b 100644
--- a/sway/tree/view.c
+++ b/sway/tree/view.c
@@ -1,9 +1,10 @@
#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"
-#include "log.h"
const char *view_get_title(struct sway_view *view) {
if (view->iface.get_prop) {
@@ -105,3 +106,18 @@ struct sway_container *container_view_destroy(struct sway_container *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);
+}