diff options
author | Ryan Dwyer <RyanDwyer@users.noreply.github.com> | 2018-08-19 16:07:11 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-19 16:07:11 +1000 |
commit | 7f22fab3895ff090d5e26936f4e964e081090164 (patch) | |
tree | c5d96041e3270b1d1d50f8a42d91652d615c9938 /sway/desktop/desktop.c | |
parent | 37e37627cae0a23d9f763cc56378b528f2ff3885 (diff) | |
parent | d0a24465d75cc7197ee253e1de9fa961071cd034 (diff) | |
download | sway-7f22fab3895ff090d5e26936f4e964e081090164.tar.xz |
Merge branch 'master' into commands
Diffstat (limited to 'sway/desktop/desktop.c')
-rw-r--r-- | sway/desktop/desktop.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/sway/desktop/desktop.c b/sway/desktop/desktop.c index 6575519d..72650397 100644 --- a/sway/desktop/desktop.c +++ b/sway/desktop/desktop.c @@ -22,3 +22,21 @@ void desktop_damage_whole_container(struct sway_container *con) { } } } + +void desktop_damage_box(struct wlr_box *box) { + for (int i = 0; i < root_container.children->length; ++i) { + struct sway_container *cont = root_container.children->items[i]; + output_damage_box(cont->sway_output, box); + } +} + +void desktop_damage_view(struct sway_view *view) { + desktop_damage_whole_container(view->swayc); + struct wlr_box box = { + .x = view->swayc->current.view_x - view->geometry.x, + .y = view->swayc->current.view_y - view->geometry.y, + .width = view->surface->current.width, + .height = view->surface->current.height, + }; + desktop_damage_box(&box); +} |