aboutsummaryrefslogtreecommitdiff
path: root/include/wlr
diff options
context:
space:
mode:
Diffstat (limited to 'include/wlr')
-rw-r--r--include/wlr/types/wlr_output.h13
-rw-r--r--include/wlr/types/wlr_output_damage.h1
2 files changed, 11 insertions, 3 deletions
diff --git a/include/wlr/types/wlr_output.h b/include/wlr/types/wlr_output.h
index 436bcac3..9d6e85b3 100644
--- a/include/wlr/types/wlr_output.h
+++ b/include/wlr/types/wlr_output.h
@@ -138,7 +138,6 @@ struct wlr_output {
bool needs_frame;
// damage for cursors and fullscreen surface, in output-local coordinates
- pixman_region32_t damage;
bool frame_pending;
float transform_matrix[9];
@@ -150,8 +149,11 @@ struct wlr_output {
struct {
// Request to render a frame
struct wl_signal frame;
- // Emitted when buffers need to be swapped (because software cursors or
- // fullscreen damage or because of backend-specific logic)
+ // Emitted when software cursors or backend-specific logic damage the
+ // output
+ struct wl_signal damage; // wlr_output_event_damage
+ // Emitted when a new frame needs to be committed (because of
+ // backend-specific logic)
struct wl_signal needs_frame;
// Emitted right before commit
struct wl_signal precommit; // wlr_output_event_precommit
@@ -181,6 +183,11 @@ struct wlr_output {
void *data;
};
+struct wlr_output_event_damage {
+ struct wlr_output *output;
+ pixman_region32_t *damage; // output-buffer-local coordinates
+};
+
struct wlr_output_event_precommit {
struct wlr_output *output;
struct timespec *when;
diff --git a/include/wlr/types/wlr_output_damage.h b/include/wlr/types/wlr_output_damage.h
index 708ee9b6..4cdb0a54 100644
--- a/include/wlr/types/wlr_output_damage.h
+++ b/include/wlr/types/wlr_output_damage.h
@@ -52,6 +52,7 @@ struct wlr_output_damage {
struct wl_listener output_transform;
struct wl_listener output_scale;
struct wl_listener output_needs_frame;
+ struct wl_listener output_damage;
struct wl_listener output_frame;
struct wl_listener output_commit;
};