[PATCH weston v2 02/10] compositor: Track inhibition state in weston_surface

Bryce Harrington bryce at osg.samsung.com
Thu Mar 24 18:27:46 UTC 2016


Signed-off-by: Bryce Harrington <bryce at osg.samsung.com>
---
 src/compositor.c | 2 ++
 src/compositor.h | 7 +++++++
 2 files changed, 9 insertions(+)

diff --git a/src/compositor.c b/src/compositor.c
index 83cabf7..4b091b0 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -612,6 +612,8 @@ weston_surface_create(struct weston_compositor *compositor)
 	weston_matrix_init(&surface->buffer_to_surface_matrix);
 	weston_matrix_init(&surface->surface_to_buffer_matrix);
 
+	surface->inhibit_screensaving = false;
+
 	return surface;
 }
 
diff --git a/src/compositor.h b/src/compositor.h
index df8ef2d..d982feb 100644
--- a/src/compositor.h
+++ b/src/compositor.h
@@ -1037,6 +1037,13 @@ struct weston_surface {
 	const char *role_name;
 
 	struct weston_timeline_object timeline;
+
+	/*
+	 * Indicates the surface prefers no screenblanking, screensaving,
+	 * or other automatic obscurement to kick in while the surface is
+	 * considered "active" by the shell.
+	 */
+	bool inhibit_screensaving;
 };
 
 struct weston_subsurface {
-- 
1.9.1



More information about the wayland-devel mailing list