aboutsummaryrefslogtreecommitdiff
path: root/include/sway
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2017-11-25 16:30:15 -0500
committerDrew DeVault <sir@cmpwn.com>2017-11-25 16:30:15 -0500
commit8caabe59c2e6f6174678e6c28be3381a7dabff10 (patch)
tree5425efb1f3b68e9b275d8429bba70a2b132b72c9 /include/sway
parenta57d46292694e388d74add7b0869bcafdb42b2bd (diff)
Handle view destruction properly
Diffstat (limited to 'include/sway')
-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);
swayc_t *new_workspace(swayc_t *output, const char *name);
swayc_t *new_view(swayc_t *sibling, struct sway_view *sway_view);
+swayc_t *destroy_view(swayc_t *view);
+
swayc_t *swayc_parent_by_type(swayc_t *container, enum swayc_types type);
#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;
void init_layout(void);
void add_child(struct sway_container *parent, struct sway_container *child);
+struct sway_container *remove_child(struct sway_container *child);
enum swayc_layouts default_layout(struct sway_container *output);
void sort_workspaces(struct sway_container *output);
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 {
struct wl_listener request_move;
struct wl_listener request_resize;
struct wl_listener request_maximize;
+ struct wl_listener destroy;
int pending_width, pending_height;
};
@@ -38,7 +39,6 @@ enum sway_view_prop {
* tree (shell surfaces).
*/
struct sway_view {
- struct wl_listener destroy;
enum sway_view_type type;
struct sway_container *swayc;
struct wlr_surface *surface;