diff options
author | emersion <contact@emersion.fr> | 2018-06-27 15:17:40 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-27 15:17:40 +0100 |
commit | 9f1d6c58ed16bf2a7c1e4f39b38848adfe426095 (patch) | |
tree | d20612c31824beb92abce0ec2aabc0977620a9bc /include/wlr | |
parent | 159835de249acf9a87b2e75b97db6c5fab0a600b (diff) | |
parent | d0b902b962535fc71be03aac13b2a8b6ee3e04df (diff) |
Merge pull request #1091 from martinetd/idle
wlr_idle: add helper to enable/disable all timers
Diffstat (limited to 'include/wlr')
-rw-r--r-- | include/wlr/types/wlr_idle.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/wlr/types/wlr_idle.h b/include/wlr/types/wlr_idle.h index 45f350be..aca9146c 100644 --- a/include/wlr/types/wlr_idle.h +++ b/include/wlr/types/wlr_idle.h @@ -17,6 +17,7 @@ struct wlr_idle { struct wl_global *wl_global; struct wl_list idle_timers; // wlr_idle_timeout::link struct wl_event_loop *event_loop; + bool enabled; struct wl_listener display_destroy; struct { @@ -33,6 +34,7 @@ struct wlr_idle_timeout { struct wl_event_source *idle_source; bool idle_state; + bool enabled; uint32_t timeout; // milliseconds struct wl_listener input_listener; @@ -50,4 +52,11 @@ void wlr_idle_destroy(struct wlr_idle *idle); * compositor when there is an user activity event on that seat. */ void wlr_idle_notify_activity(struct wlr_idle *idle, struct wlr_seat *seat); + +/** + * Enable or disable timers for a given idle resource by seat. + * Passing a NULL seat means update timers for all seats. + */ +void wlr_idle_set_enabled(struct wlr_idle *idle, struct wlr_seat *seat, + bool enabled); #endif |