diff options
author | Dominique Martinet <asmadeus@codewreck.org> | 2018-07-02 09:26:57 +0900 |
---|---|---|
committer | Dominique Martinet <asmadeus@codewreck.org> | 2018-07-02 09:29:16 +0900 |
commit | 71224781c48f98f43f5836de663ef6e01604419c (patch) | |
tree | 7c2336020076f123184d1c18bbcb7db3e95be526 /include/sway/desktop/idle_inhibit_v1.h | |
parent | idle_inhibit: stop inhibitor when views become invisible (diff) | |
download | sway-71224781c48f98f43f5836de663ef6e01604419c.tar.gz sway-71224781c48f98f43f5836de663ef6e01604419c.tar.zst sway-71224781c48f98f43f5836de663ef6e01604419c.zip |
idle_inhibit: move server data to its own struct
Diffstat (limited to 'include/sway/desktop/idle_inhibit_v1.h')
-rw-r--r-- | include/sway/desktop/idle_inhibit_v1.h | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/include/sway/desktop/idle_inhibit_v1.h b/include/sway/desktop/idle_inhibit_v1.h index 1764713c..e5ed8a3d 100644 --- a/include/sway/desktop/idle_inhibit_v1.h +++ b/include/sway/desktop/idle_inhibit_v1.h | |||
@@ -1,17 +1,28 @@ | |||
1 | |||
2 | #ifndef _SWAY_DESKTOP_IDLE_INHIBIT_V1_H | 1 | #ifndef _SWAY_DESKTOP_IDLE_INHIBIT_V1_H |
3 | #define _SWAY_DESKTOP_IDLE_INHIBIT_V1_H | 2 | #define _SWAY_DESKTOP_IDLE_INHIBIT_V1_H |
4 | #include <wlr/types/wlr_idle_inhibit_v1.h> | 3 | #include <wlr/types/wlr_idle_inhibit_v1.h> |
4 | #include <wlr/types/wlr_idle.h> | ||
5 | #include "sway/server.h" | 5 | #include "sway/server.h" |
6 | 6 | ||
7 | struct sway_idle_inhibit_manager_v1 { | ||
8 | struct wlr_idle_inhibit_manager_v1 *wlr_manager; | ||
9 | struct wl_listener new_idle_inhibitor_v1; | ||
10 | struct wl_list inhibitors; | ||
11 | |||
12 | struct wlr_idle *idle; | ||
13 | }; | ||
14 | |||
7 | struct sway_idle_inhibitor_v1 { | 15 | struct sway_idle_inhibitor_v1 { |
8 | struct sway_server *server; | 16 | struct sway_idle_inhibit_manager_v1 *manager; |
9 | struct sway_view *view; | 17 | struct sway_view *view; |
10 | 18 | ||
11 | struct wl_list link; | 19 | struct wl_list link; |
12 | struct wl_listener destroy; | 20 | struct wl_listener destroy; |
13 | }; | 21 | }; |
14 | 22 | ||
15 | void idle_inhibit_v1_check_active(struct sway_server *server); | 23 | void idle_inhibit_v1_check_active( |
24 | struct sway_idle_inhibit_manager_v1 *manager); | ||
16 | 25 | ||
26 | struct sway_idle_inhibit_manager_v1 *sway_idle_inhibit_manager_v1_create( | ||
27 | struct wl_display *wl_display, struct wlr_idle *idle); | ||
17 | #endif | 28 | #endif |