compositor: Add internal support to track idle inhibition requests
Adds a helper routine weston_output_inhibited_outputs() which returns a
mask of outputs that should inhibit screen idling.
Use this routine to check for inhibiting outputs for handling of idle
behaviors in core: In sleep mode, only halt repainting outputs that
don't have valid inhibits. Don't send these monitors DPMS off commands
either, if the system would otherwise be powering them down.
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
v5: Drop unused view variable
diff --git a/libweston/compositor.h b/libweston/compositor.h
index 16db03b..7a53127 100644
--- a/libweston/compositor.h
+++ b/libweston/compositor.h
@@ -1155,6 +1155,14 @@
/* An list of per seat pointer constraints. */
struct wl_list pointer_constraints;
+
+ /*
+ * 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_idling;
+
};
struct weston_subsurface {
@@ -1331,6 +1339,8 @@
weston_output_schedule_repaint(struct weston_output *output);
void
weston_output_damage(struct weston_output *output);
+uint32_t
+weston_compositor_inhibited_outputs(struct weston_compositor *compositor);
void
weston_compositor_schedule_repaint(struct weston_compositor *compositor);
void