diff options
author | 2018-03-30 18:53:36 -0400 | |
---|---|---|
committer | 2018-03-30 18:53:36 -0400 | |
commit | 1b88eaee6b14987c585fcf149cc26f665c584d77 (patch) | |
tree | 047052218c4f19701f29c4e5547856f445670c5b /include | |
parent | Merge pull request #1669 from emersion/workspace-pointer-events (diff) | |
parent | Handle map/unmap events in xdg-shell-v6 (diff) | |
download | sway-1b88eaee6b14987c585fcf149cc26f665c584d77.tar.gz sway-1b88eaee6b14987c585fcf149cc26f665c584d77.tar.zst sway-1b88eaee6b14987c585fcf149cc26f665c584d77.zip |
Merge pull request #1665 from emersion/damage-tracking-lite
Add lite damage tracking
Diffstat (limited to 'include')
-rw-r--r-- | include/sway/output.h | 14 | ||||
-rw-r--r-- | include/sway/server.h | 1 | ||||
-rw-r--r-- | include/sway/tree/view.h | 8 |
3 files changed, 19 insertions, 4 deletions
diff --git a/include/sway/output.h b/include/sway/output.h index 6fb79987..b4980cd8 100644 --- a/include/sway/output.h +++ b/include/sway/output.h | |||
@@ -5,6 +5,7 @@ | |||
5 | #include <wayland-server.h> | 5 | #include <wayland-server.h> |
6 | #include <wlr/types/wlr_box.h> | 6 | #include <wlr/types/wlr_box.h> |
7 | #include <wlr/types/wlr_output.h> | 7 | #include <wlr/types/wlr_output.h> |
8 | #include "sway/tree/view.h" | ||
8 | 9 | ||
9 | struct sway_server; | 10 | struct sway_server; |
10 | struct sway_container; | 11 | struct sway_container; |
@@ -13,17 +14,26 @@ struct sway_output { | |||
13 | struct wlr_output *wlr_output; | 14 | struct wlr_output *wlr_output; |
14 | struct sway_container *swayc; | 15 | struct sway_container *swayc; |
15 | struct sway_server *server; | 16 | struct sway_server *server; |
16 | struct timespec last_frame; | ||
17 | 17 | ||
18 | struct wl_list layers[4]; // sway_layer_surface::link | 18 | struct wl_list layers[4]; // sway_layer_surface::link |
19 | struct wlr_box usable_area; | 19 | struct wlr_box usable_area; |
20 | 20 | ||
21 | struct wl_listener frame; | 21 | struct timespec last_frame; |
22 | struct wlr_output_damage *damage; | ||
23 | |||
22 | struct wl_listener destroy; | 24 | struct wl_listener destroy; |
23 | struct wl_listener mode; | 25 | struct wl_listener mode; |
24 | struct wl_listener transform; | 26 | struct wl_listener transform; |
25 | 27 | ||
28 | struct wl_listener damage_destroy; | ||
29 | struct wl_listener damage_frame; | ||
30 | |||
26 | pid_t bg_pid; | 31 | pid_t bg_pid; |
27 | }; | 32 | }; |
28 | 33 | ||
34 | void output_damage_whole(struct sway_output *output); | ||
35 | |||
36 | void output_damage_whole_view(struct sway_output *output, | ||
37 | struct sway_view *view); | ||
38 | |||
29 | #endif | 39 | #endif |
diff --git a/include/sway/server.h b/include/sway/server.h index db81932f..61f21cdb 100644 --- a/include/sway/server.h +++ b/include/sway/server.h | |||
@@ -25,7 +25,6 @@ struct sway_server { | |||
25 | struct sway_input_manager *input; | 25 | struct sway_input_manager *input; |
26 | 26 | ||
27 | struct wl_listener new_output; | 27 | struct wl_listener new_output; |
28 | struct wl_listener output_frame; | ||
29 | 28 | ||
30 | struct wlr_layer_shell *layer_shell; | 29 | struct wlr_layer_shell *layer_shell; |
31 | struct wl_listener layer_shell_surface; | 30 | struct wl_listener layer_shell_surface; |
diff --git a/include/sway/tree/view.h b/include/sway/tree/view.h index 54f6d90e..3965d2b7 100644 --- a/include/sway/tree/view.h +++ b/include/sway/tree/view.h | |||
@@ -15,6 +15,8 @@ struct sway_xdg_surface_v6 { | |||
15 | struct wl_listener request_move; | 15 | struct wl_listener request_move; |
16 | struct wl_listener request_resize; | 16 | struct wl_listener request_resize; |
17 | struct wl_listener request_maximize; | 17 | struct wl_listener request_maximize; |
18 | struct wl_listener map; | ||
19 | struct wl_listener unmap; | ||
18 | struct wl_listener destroy; | 20 | struct wl_listener destroy; |
19 | 21 | ||
20 | int pending_width, pending_height; | 22 | int pending_width, pending_height; |
@@ -28,8 +30,8 @@ struct sway_xwayland_surface { | |||
28 | struct wl_listener request_resize; | 30 | struct wl_listener request_resize; |
29 | struct wl_listener request_maximize; | 31 | struct wl_listener request_maximize; |
30 | struct wl_listener request_configure; | 32 | struct wl_listener request_configure; |
31 | struct wl_listener unmap; | ||
32 | struct wl_listener map; | 33 | struct wl_listener map; |
34 | struct wl_listener unmap; | ||
33 | struct wl_listener destroy; | 35 | struct wl_listener destroy; |
34 | 36 | ||
35 | int pending_width, pending_height; | 37 | int pending_width, pending_height; |
@@ -113,4 +115,8 @@ void view_close(struct sway_view *view); | |||
113 | 115 | ||
114 | void view_update_outputs(struct sway_view *view, const struct wlr_box *before); | 116 | void view_update_outputs(struct sway_view *view, const struct wlr_box *before); |
115 | 117 | ||
118 | void view_damage_whole(struct sway_view *view); | ||
119 | |||
120 | void view_damage_from(struct sway_view *view); | ||
121 | |||
116 | #endif | 122 | #endif |