diff options
author | emersion <contact@emersion.fr> | 2018-04-05 14:46:02 -0400 |
---|---|---|
committer | emersion <contact@emersion.fr> | 2018-04-05 15:20:45 -0400 |
commit | 45f93e165096ed04c4d1152523502ae5fc760632 (patch) | |
tree | f10b226c06968591887ade9a7b485707078cb8b6 /include | |
parent | Configure wlr_xdg_output_manager during init (diff) | |
download | sway-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.h | 33 |
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 | ||
50 | struct sway_xdg_shell_v6_view { | 56 | struct 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 | ||
104 | struct sway_view_child; | ||
105 | |||
106 | struct 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 | */ | ||
113 | struct 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 | |||
98 | const char *view_get_title(struct sway_view *view); | 125 | const char *view_get_title(struct sway_view *view); |
99 | 126 | ||
100 | const char *view_get_app_id(struct sway_view *view); | 127 | const 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 | ||
130 | void view_update_size(struct sway_view *view, int width, int height); | 157 | void view_update_size(struct sway_view *view, int width, int height); |
131 | 158 | ||
159 | void 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 | |||
163 | void view_child_destroy(struct sway_view_child *child); | ||
164 | |||
132 | #endif | 165 | #endif |