diff options
author | Drew DeVault <sir@cmpwn.com> | 2017-11-25 16:30:15 -0500 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2017-11-25 16:30:15 -0500 |
commit | 8caabe59c2e6f6174678e6c28be3381a7dabff10 (patch) | |
tree | 5425efb1f3b68e9b275d8429bba70a2b132b72c9 /include | |
parent | Fix rendering issues, wire up some xdg listeners (diff) | |
download | sway-8caabe59c2e6f6174678e6c28be3381a7dabff10.tar.gz sway-8caabe59c2e6f6174678e6c28be3381a7dabff10.tar.zst sway-8caabe59c2e6f6174678e6c28be3381a7dabff10.zip |
Handle view destruction properly
Diffstat (limited to 'include')
-rw-r--r-- | include/sway/container.h | 2 | ||||
-rw-r--r-- | include/sway/layout.h | 1 | ||||
-rw-r--r-- | include/sway/view.h | 2 |
3 files changed, 4 insertions, 1 deletions
diff --git a/include/sway/container.h b/include/sway/container.h index 1a173f3e..08a98ed9 100644 --- a/include/sway/container.h +++ b/include/sway/container.h | |||
@@ -132,6 +132,8 @@ swayc_t *new_output(struct sway_output *sway_output); | |||
132 | swayc_t *new_workspace(swayc_t *output, const char *name); | 132 | swayc_t *new_workspace(swayc_t *output, const char *name); |
133 | swayc_t *new_view(swayc_t *sibling, struct sway_view *sway_view); | 133 | swayc_t *new_view(swayc_t *sibling, struct sway_view *sway_view); |
134 | 134 | ||
135 | swayc_t *destroy_view(swayc_t *view); | ||
136 | |||
135 | swayc_t *swayc_parent_by_type(swayc_t *container, enum swayc_types type); | 137 | swayc_t *swayc_parent_by_type(swayc_t *container, enum swayc_types type); |
136 | 138 | ||
137 | #endif | 139 | #endif |
diff --git a/include/sway/layout.h b/include/sway/layout.h index 505036a0..f3b62b05 100644 --- a/include/sway/layout.h +++ b/include/sway/layout.h | |||
@@ -5,6 +5,7 @@ struct sway_container; | |||
5 | 5 | ||
6 | void init_layout(void); | 6 | void init_layout(void); |
7 | void add_child(struct sway_container *parent, struct sway_container *child); | 7 | void add_child(struct sway_container *parent, struct sway_container *child); |
8 | struct sway_container *remove_child(struct sway_container *child); | ||
8 | enum swayc_layouts default_layout(struct sway_container *output); | 9 | enum swayc_layouts default_layout(struct sway_container *output); |
9 | void sort_workspaces(struct sway_container *output); | 10 | void sort_workspaces(struct sway_container *output); |
10 | void arrange_windows(struct sway_container *container, double width, double height); | 11 | void arrange_windows(struct sway_container *container, double width, double height); |
diff --git a/include/sway/view.h b/include/sway/view.h index fca444b7..2707ca78 100644 --- a/include/sway/view.h +++ b/include/sway/view.h | |||
@@ -14,6 +14,7 @@ struct sway_xdg_surface_v6 { | |||
14 | struct wl_listener request_move; | 14 | struct wl_listener request_move; |
15 | struct wl_listener request_resize; | 15 | struct wl_listener request_resize; |
16 | struct wl_listener request_maximize; | 16 | struct wl_listener request_maximize; |
17 | struct wl_listener destroy; | ||
17 | 18 | ||
18 | int pending_width, pending_height; | 19 | int pending_width, pending_height; |
19 | }; | 20 | }; |
@@ -38,7 +39,6 @@ enum sway_view_prop { | |||
38 | * tree (shell surfaces). | 39 | * tree (shell surfaces). |
39 | */ | 40 | */ |
40 | struct sway_view { | 41 | struct sway_view { |
41 | struct wl_listener destroy; | ||
42 | enum sway_view_type type; | 42 | enum sway_view_type type; |
43 | struct sway_container *swayc; | 43 | struct sway_container *swayc; |
44 | struct wlr_surface *surface; | 44 | struct wlr_surface *surface; |