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