diff options
author | 2018-08-18 19:26:36 -0400 | |
---|---|---|
committer | 2018-08-18 19:26:36 -0400 | |
commit | d0a24465d75cc7197ee253e1de9fa961071cd034 (patch) | |
tree | 916f9f40b9f587d3cd24a8d7b2185b5c7808cfa4 /sway/desktop/desktop.c | |
parent | Merge pull request #2484 from ianyfan/con-for-each-child-fix (diff) | |
parent | Fix nitpick (diff) | |
download | sway-d0a24465d75cc7197ee253e1de9fa961071cd034.tar.gz sway-d0a24465d75cc7197ee253e1de9fa961071cd034.tar.zst sway-d0a24465d75cc7197ee253e1de9fa961071cd034.zip |
Merge pull request #2466 from RyanDwyer/geometry
Fix geometry
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) { | |||
22 | } | 22 | } |
23 | } | 23 | } |
24 | } | 24 | } |
25 | |||
26 | void desktop_damage_box(struct wlr_box *box) { | ||
27 | for (int i = 0; i < root_container.children->length; ++i) { | ||
28 | struct sway_container *cont = root_container.children->items[i]; | ||
29 | output_damage_box(cont->sway_output, box); | ||
30 | } | ||
31 | } | ||
32 | |||
33 | void desktop_damage_view(struct sway_view *view) { | ||
34 | desktop_damage_whole_container(view->swayc); | ||
35 | struct wlr_box box = { | ||
36 | .x = view->swayc->current.view_x - view->geometry.x, | ||
37 | .y = view->swayc->current.view_y - view->geometry.y, | ||
38 | .width = view->surface->current.width, | ||
39 | .height = view->surface->current.height, | ||
40 | }; | ||
41 | desktop_damage_box(&box); | ||
42 | } | ||