From 072b334abc6f065080bf944767bbd53d7a590e47 Mon Sep 17 00:00:00 2001 From: Dominique Martinet Date: Sat, 30 Jun 2018 14:09:32 +0900 Subject: idle_inhibit: stop inhibitor when views become invisible --- include/sway/desktop/idle_inhibit_v1.h | 4 ++++ include/sway/server.h | 1 + 2 files changed, 5 insertions(+) (limited to 'include') diff --git a/include/sway/desktop/idle_inhibit_v1.h b/include/sway/desktop/idle_inhibit_v1.h index 94c25a42..1764713c 100644 --- a/include/sway/desktop/idle_inhibit_v1.h +++ b/include/sway/desktop/idle_inhibit_v1.h @@ -6,8 +6,12 @@ struct sway_idle_inhibitor_v1 { struct sway_server *server; + struct sway_view *view; + struct wl_list link; struct wl_listener destroy; }; +void idle_inhibit_v1_check_active(struct sway_server *server); + #endif diff --git a/include/sway/server.h b/include/sway/server.h index 246a9381..693e6b82 100644 --- a/include/sway/server.h +++ b/include/sway/server.h @@ -32,6 +32,7 @@ struct sway_server { struct wlr_idle_inhibit_manager_v1 *idle_inhibit_v1; struct wl_listener new_idle_inhibitor_v1; + struct wl_list idle_inhibitors_v1; struct wlr_layer_shell *layer_shell; struct wl_listener layer_shell_surface; -- cgit v1.2.3-54-g00ecf