diff options
author | Drew DeVault <sir@cmpwn.com> | 2019-07-05 14:45:11 -0400 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2019-08-14 22:10:05 +0300 |
commit | cb8f68d74b6c9f0b9690c44a34b8a8f1c46986be (patch) | |
tree | a49f7022c65a5a11f6fbdb4c164ac3a4c9b3c2cd /include | |
parent | workspace_split: focus middle if workspace focused (diff) | |
download | sway-cb8f68d74b6c9f0b9690c44a34b8a8f1c46986be.tar.gz sway-cb8f68d74b6c9f0b9690c44a34b8a8f1c46986be.tar.zst sway-cb8f68d74b6c9f0b9690c44a34b8a8f1c46986be.zip |
layer-shell: add support for popups
Diffstat (limited to 'include')
-rw-r--r-- | include/sway/layers.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/include/sway/layers.h b/include/sway/layers.h index 51878fc9..01d066d5 100644 --- a/include/sway/layers.h +++ b/include/sway/layers.h | |||
@@ -5,6 +5,11 @@ | |||
5 | #include <wlr/types/wlr_surface.h> | 5 | #include <wlr/types/wlr_surface.h> |
6 | #include <wlr/types/wlr_layer_shell_v1.h> | 6 | #include <wlr/types/wlr_layer_shell_v1.h> |
7 | 7 | ||
8 | enum layer_parent { | ||
9 | LAYER_PARENT_LAYER, | ||
10 | LAYER_PARENT_POPUP, | ||
11 | }; | ||
12 | |||
8 | struct sway_layer_surface { | 13 | struct sway_layer_surface { |
9 | struct wlr_layer_surface_v1 *layer_surface; | 14 | struct wlr_layer_surface_v1 *layer_surface; |
10 | struct wl_list link; | 15 | struct wl_list link; |
@@ -14,11 +19,26 @@ struct sway_layer_surface { | |||
14 | struct wl_listener unmap; | 19 | struct wl_listener unmap; |
15 | struct wl_listener surface_commit; | 20 | struct wl_listener surface_commit; |
16 | struct wl_listener output_destroy; | 21 | struct wl_listener output_destroy; |
22 | struct wl_listener new_popup; | ||
17 | 23 | ||
18 | bool configured; | 24 | bool configured; |
19 | struct wlr_box geo; | 25 | struct wlr_box geo; |
20 | }; | 26 | }; |
21 | 27 | ||
28 | struct sway_layer_popup { | ||
29 | struct wlr_xdg_popup *wlr_popup; | ||
30 | enum layer_parent parent_type; | ||
31 | union { | ||
32 | struct sway_layer_surface *parent_layer; | ||
33 | struct sway_layer_popup *parent_popup; | ||
34 | }; | ||
35 | struct wl_listener map; | ||
36 | struct wl_listener unmap; | ||
37 | struct wl_listener destroy; | ||
38 | struct wl_listener commit; | ||
39 | struct wl_listener new_popup; | ||
40 | }; | ||
41 | |||
22 | struct sway_output; | 42 | struct sway_output; |
23 | void arrange_layers(struct sway_output *output); | 43 | void arrange_layers(struct sway_output *output); |
24 | 44 | ||