idle_inhibit: stop inhibitor when views become invisible

This commit is contained in:
Dominique Martinet 2018-06-30 14:09:32 +09:00
parent e4bfb3bc98
commit 072b334abc
5 changed files with 31 additions and 0 deletions

View file

@ -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

View file

@ -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;