summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2017-11-25 16:30:15 -0500
committerLibravatar Drew DeVault <sir@cmpwn.com>2017-11-25 16:30:15 -0500
commit8caabe59c2e6f6174678e6c28be3381a7dabff10 (patch)
tree5425efb1f3b68e9b275d8429bba70a2b132b72c9 /include
parentFix rendering issues, wire up some xdg listeners (diff)
downloadsway-8caabe59c2e6f6174678e6c28be3381a7dabff10.tar.gz
sway-8caabe59c2e6f6174678e6c28be3381a7dabff10.tar.zst
sway-8caabe59c2e6f6174678e6c28be3381a7dabff10.zip
Handle view destruction properly
Diffstat (limited to 'include')
-rw-r--r--include/sway/container.h2
-rw-r--r--include/sway/layout.h1
-rw-r--r--include/sway/view.h2
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);
132swayc_t *new_workspace(swayc_t *output, const char *name); 132swayc_t *new_workspace(swayc_t *output, const char *name);
133swayc_t *new_view(swayc_t *sibling, struct sway_view *sway_view); 133swayc_t *new_view(swayc_t *sibling, struct sway_view *sway_view);
134 134
135swayc_t *destroy_view(swayc_t *view);
136
135swayc_t *swayc_parent_by_type(swayc_t *container, enum swayc_types type); 137swayc_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
6void init_layout(void); 6void init_layout(void);
7void add_child(struct sway_container *parent, struct sway_container *child); 7void add_child(struct sway_container *parent, struct sway_container *child);
8struct sway_container *remove_child(struct sway_container *child);
8enum swayc_layouts default_layout(struct sway_container *output); 9enum swayc_layouts default_layout(struct sway_container *output);
9void sort_workspaces(struct sway_container *output); 10void sort_workspaces(struct sway_container *output);
10void arrange_windows(struct sway_container *container, double width, double height); 11void 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 */
40struct sway_view { 41struct 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;