diff options
Diffstat (limited to 'sway/desktop/desktop.c')
-rw-r--r-- | sway/desktop/desktop.c | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/sway/desktop/desktop.c b/sway/desktop/desktop.c deleted file mode 100644 index ec45d80a..00000000 --- a/sway/desktop/desktop.c +++ /dev/null | |||
@@ -1,39 +0,0 @@ | |||
1 | #include "sway/tree/container.h" | ||
2 | #include "sway/desktop.h" | ||
3 | #include "sway/output.h" | ||
4 | |||
5 | void desktop_damage_surface(struct wlr_surface *surface, double lx, double ly, | ||
6 | bool whole) { | ||
7 | for (int i = 0; i < root->outputs->length; ++i) { | ||
8 | struct sway_output *output = root->outputs->items[i]; | ||
9 | struct wlr_box *output_box = wlr_output_layout_get_box( | ||
10 | root->output_layout, output->wlr_output); | ||
11 | output_damage_surface(output, lx - output_box->x, | ||
12 | ly - output_box->y, surface, whole); | ||
13 | } | ||
14 | } | ||
15 | |||
16 | void desktop_damage_whole_container(struct sway_container *con) { | ||
17 | for (int i = 0; i < root->outputs->length; ++i) { | ||
18 | struct sway_output *output = root->outputs->items[i]; | ||
19 | output_damage_whole_container(output, con); | ||
20 | } | ||
21 | } | ||
22 | |||
23 | void desktop_damage_box(struct wlr_box *box) { | ||
24 | for (int i = 0; i < root->outputs->length; ++i) { | ||
25 | struct sway_output *output = root->outputs->items[i]; | ||
26 | output_damage_box(output, box); | ||
27 | } | ||
28 | } | ||
29 | |||
30 | void desktop_damage_view(struct sway_view *view) { | ||
31 | desktop_damage_whole_container(view->container); | ||
32 | struct wlr_box box = { | ||
33 | .x = view->container->current.content_x - view->geometry.x, | ||
34 | .y = view->container->current.content_y - view->geometry.y, | ||
35 | .width = view->surface->current.width, | ||
36 | .height = view->surface->current.height, | ||
37 | }; | ||
38 | desktop_damage_box(&box); | ||
39 | } | ||