aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLibravatar emersion <contact@emersion.fr>2018-04-05 14:46:02 -0400
committerLibravatar emersion <contact@emersion.fr>2018-04-05 15:20:45 -0400
commit45f93e165096ed04c4d1152523502ae5fc760632 (patch)
treef10b226c06968591887ade9a7b485707078cb8b6 /include
parentConfigure wlr_xdg_output_manager during init (diff)
downloadsway-45f93e165096ed04c4d1152523502ae5fc760632.tar.gz
sway-45f93e165096ed04c4d1152523502ae5fc760632.tar.zst
sway-45f93e165096ed04c4d1152523502ae5fc760632.zip
Accumulate damage from subsurfaces
Diffstat (limited to 'include')
-rw-r--r--include/sway/tree/view.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/include/sway/tree/view.h b/include/sway/tree/view.h
index d4dace4a..f8e41652 100644
--- a/include/sway/tree/view.h
+++ b/include/sway/tree/view.h
@@ -45,6 +45,12 @@ struct sway_view {
45 struct wlr_xwayland_surface *wlr_xwayland_surface; 45 struct wlr_xwayland_surface *wlr_xwayland_surface;
46 struct wlr_wl_shell_surface *wlr_wl_shell_surface; 46 struct wlr_wl_shell_surface *wlr_wl_shell_surface;
47 }; 47 };
48
49 struct {
50 struct wl_signal unmap;
51 } events;
52
53 struct wl_listener surface_new_subsurface;
48}; 54};
49 55
50struct sway_xdg_shell_v6_view { 56struct sway_xdg_shell_v6_view {
@@ -95,6 +101,27 @@ struct sway_wl_shell_view {
95 int pending_width, pending_height; 101 int pending_width, pending_height;
96}; 102};
97 103
104struct sway_view_child;
105
106struct sway_view_child_impl {
107 void (*destroy)(struct sway_view_child *child);
108};
109
110/**
111 * A view child is a surface in the view tree, such as a subsurface or a popup.
112 */
113struct sway_view_child {
114 const struct sway_view_child_impl *impl;
115
116 struct sway_view *view;
117 struct wlr_surface *surface;
118
119 struct wl_listener surface_commit;
120 struct wl_listener surface_new_subsurface;
121 struct wl_listener surface_destroy;
122 struct wl_listener view_unmap;
123};
124
98const char *view_get_title(struct sway_view *view); 125const char *view_get_title(struct sway_view *view);
99 126
100const char *view_get_app_id(struct sway_view *view); 127const char *view_get_app_id(struct sway_view *view);
@@ -129,4 +156,10 @@ void view_update_position(struct sway_view *view, double ox, double oy);
129 156
130void view_update_size(struct sway_view *view, int width, int height); 157void view_update_size(struct sway_view *view, int width, int height);
131 158
159void view_child_init(struct sway_view_child *child,
160 const struct sway_view_child_impl *impl, struct sway_view *view,
161 struct wlr_surface *surface);
162
163void view_child_destroy(struct sway_view_child *child);
164
132#endif 165#endif