diff options
author | Drew DeVault <sir@cmpwn.com> | 2017-12-03 17:15:58 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-03 17:15:58 -0500 |
commit | c733e0858fcf9e54dd41f7b8882d5fe722bb01b4 (patch) | |
tree | 35d7016c86a5de5e662ff546ffda3394e34d6ec4 /include | |
parent | Merge pull request #1491 from acrisci/refactor/dimension-to-size (diff) | |
parent | wl-shell: class instead of app_id (diff) | |
download | sway-c733e0858fcf9e54dd41f7b8882d5fe722bb01b4.tar.gz sway-c733e0858fcf9e54dd41f7b8882d5fe722bb01b4.tar.zst sway-c733e0858fcf9e54dd41f7b8882d5fe722bb01b4.zip |
Merge pull request #1493 from acrisci/feature/wl-shell
basic wl_shell
Diffstat (limited to 'include')
-rw-r--r-- | include/sway/server.h | 4 | ||||
-rw-r--r-- | include/sway/view.h | 16 |
2 files changed, 19 insertions, 1 deletions
diff --git a/include/sway/server.h b/include/sway/server.h index b0684d15..bfdb7b8a 100644 --- a/include/sway/server.h +++ b/include/sway/server.h | |||
@@ -30,6 +30,9 @@ struct sway_server { | |||
30 | 30 | ||
31 | struct wlr_xdg_shell_v6 *xdg_shell_v6; | 31 | struct wlr_xdg_shell_v6 *xdg_shell_v6; |
32 | struct wl_listener xdg_shell_v6_surface; | 32 | struct wl_listener xdg_shell_v6_surface; |
33 | |||
34 | struct wlr_wl_shell *wl_shell; | ||
35 | struct wl_listener wl_shell_surface; | ||
33 | }; | 36 | }; |
34 | 37 | ||
35 | struct sway_server server; | 38 | struct sway_server server; |
@@ -42,5 +45,6 @@ void output_add_notify(struct wl_listener *listener, void *data); | |||
42 | void output_remove_notify(struct wl_listener *listener, void *data); | 45 | void output_remove_notify(struct wl_listener *listener, void *data); |
43 | 46 | ||
44 | void handle_xdg_shell_v6_surface(struct wl_listener *listener, void *data); | 47 | void handle_xdg_shell_v6_surface(struct wl_listener *listener, void *data); |
48 | void handle_wl_shell_surface(struct wl_listener *listener, void *data); | ||
45 | 49 | ||
46 | #endif | 50 | #endif |
diff --git a/include/sway/view.h b/include/sway/view.h index cf2e6f66..7aa04794 100644 --- a/include/sway/view.h +++ b/include/sway/view.h | |||
@@ -19,6 +19,18 @@ struct sway_xdg_surface_v6 { | |||
19 | int pending_width, pending_height; | 19 | int pending_width, pending_height; |
20 | }; | 20 | }; |
21 | 21 | ||
22 | struct sway_wl_shell_surface { | ||
23 | struct sway_view *view; | ||
24 | |||
25 | struct wl_listener commit; | ||
26 | struct wl_listener request_move; | ||
27 | struct wl_listener request_resize; | ||
28 | struct wl_listener request_maximize; | ||
29 | struct wl_listener destroy; | ||
30 | |||
31 | int pending_width, pending_height; | ||
32 | }; | ||
33 | |||
22 | enum sway_view_type { | 34 | enum sway_view_type { |
23 | SWAY_WL_SHELL_VIEW, | 35 | SWAY_WL_SHELL_VIEW, |
24 | SWAY_XDG_SHELL_V6_VIEW, | 36 | SWAY_XDG_SHELL_V6_VIEW, |
@@ -29,9 +41,9 @@ enum sway_view_type { | |||
29 | 41 | ||
30 | enum sway_view_prop { | 42 | enum sway_view_prop { |
31 | VIEW_PROP_TITLE, | 43 | VIEW_PROP_TITLE, |
44 | VIEW_PROP_APP_ID, | ||
32 | VIEW_PROP_CLASS, | 45 | VIEW_PROP_CLASS, |
33 | VIEW_PROP_INSTANCE, | 46 | VIEW_PROP_INSTANCE, |
34 | VIEW_PROP_APP_ID, | ||
35 | }; | 47 | }; |
36 | 48 | ||
37 | /** | 49 | /** |
@@ -46,10 +58,12 @@ struct sway_view { | |||
46 | 58 | ||
47 | union { | 59 | union { |
48 | struct wlr_xdg_surface_v6 *wlr_xdg_surface_v6; | 60 | struct wlr_xdg_surface_v6 *wlr_xdg_surface_v6; |
61 | struct wlr_wl_shell_surface *wlr_wl_shell_surface; | ||
49 | }; | 62 | }; |
50 | 63 | ||
51 | union { | 64 | union { |
52 | struct sway_xdg_surface_v6 *sway_xdg_surface_v6; | 65 | struct sway_xdg_surface_v6 *sway_xdg_surface_v6; |
66 | struct sway_wl_shell_surface *sway_wl_shell_surface; | ||
53 | }; | 67 | }; |
54 | 68 | ||
55 | struct { | 69 | struct { |