diff options
author | Drew DeVault <sir@cmpwn.com> | 2015-12-03 08:35:22 -0500 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2015-12-03 08:35:22 -0500 |
commit | 71afa388906bf29dcd937aa92b65a97c8b320f60 (patch) | |
tree | 7e7efa0fccde6eb99b1b1bd9d20b1d0f1b2b5f3b /include/extensions.h | |
parent | Revert "Remove build badge (Travis is broken, not sway)" (diff) | |
download | sway-71afa388906bf29dcd937aa92b65a97c8b320f60.tar.gz sway-71afa388906bf29dcd937aa92b65a97c8b320f60.tar.zst sway-71afa388906bf29dcd937aa92b65a97c8b320f60.zip |
Add swaylock protocol, add resource destructors
This prevents sway crashing if swaybg or swaybar dies.
Diffstat (limited to 'include/extensions.h')
-rw-r--r-- | include/extensions.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/include/extensions.h b/include/extensions.h index 1ef7d920..872fd3bd 100644 --- a/include/extensions.h +++ b/include/extensions.h | |||
@@ -1,18 +1,21 @@ | |||
1 | #ifndef _SWAY_EXTENSIONS_H | 1 | #ifndef _SWAY_EXTENSIONS_H |
2 | #define _SWAY_EXTENSIONS_H | 2 | #define _SWAY_EXTENSIONS_H |
3 | 3 | ||
4 | #include <wayland-server-core.h> | ||
5 | #include <wlc/wlc-wayland.h> | ||
4 | #include "wayland-desktop-shell-server-protocol.h" | 6 | #include "wayland-desktop-shell-server-protocol.h" |
5 | #include "list.h" | 7 | #include "list.h" |
6 | #include "wlc/wlc-wayland.h" | ||
7 | 8 | ||
8 | struct background_config { | 9 | struct background_config { |
9 | wlc_handle output; | 10 | wlc_handle output; |
10 | wlc_resource surface; | 11 | wlc_resource surface; |
12 | struct wl_resource *resource; | ||
11 | }; | 13 | }; |
12 | 14 | ||
13 | struct panel_config { | 15 | struct panel_config { |
14 | wlc_handle output; | 16 | wlc_handle output; |
15 | wlc_resource surface; | 17 | wlc_resource surface; |
18 | struct wl_resource *resource; | ||
16 | }; | 19 | }; |
17 | 20 | ||
18 | struct desktop_shell_state { | 21 | struct desktop_shell_state { |
@@ -22,6 +25,12 @@ struct desktop_shell_state { | |||
22 | struct wlc_size panel_size; | 25 | struct wlc_size panel_size; |
23 | }; | 26 | }; |
24 | 27 | ||
28 | struct swaylock_state { | ||
29 | bool active; | ||
30 | wlc_handle output; | ||
31 | wlc_resource surface; | ||
32 | }; | ||
33 | |||
25 | extern struct desktop_shell_state desktop_shell; | 34 | extern struct desktop_shell_state desktop_shell; |
26 | 35 | ||
27 | void register_extensions(void); | 36 | void register_extensions(void); |