Accumulate damage from subsurfaces

This commit is contained in:
emersion 2018-04-05 14:46:02 -04:00
parent 94ecd0f0aa
commit 45f93e1650
No known key found for this signature in database
GPG key ID: 0FDE7BE0E88F5E48
2 changed files with 145 additions and 0 deletions

View file

@ -45,6 +45,12 @@ struct sway_view {
struct wlr_xwayland_surface *wlr_xwayland_surface;
struct wlr_wl_shell_surface *wlr_wl_shell_surface;
};
struct {
struct wl_signal unmap;
} events;
struct wl_listener surface_new_subsurface;
};
struct sway_xdg_shell_v6_view {
@ -95,6 +101,27 @@ struct sway_wl_shell_view {
int pending_width, pending_height;
};
struct sway_view_child;
struct sway_view_child_impl {
void (*destroy)(struct sway_view_child *child);
};
/**
* A view child is a surface in the view tree, such as a subsurface or a popup.
*/
struct sway_view_child {
const struct sway_view_child_impl *impl;
struct sway_view *view;
struct wlr_surface *surface;
struct wl_listener surface_commit;
struct wl_listener surface_new_subsurface;
struct wl_listener surface_destroy;
struct wl_listener view_unmap;
};
const char *view_get_title(struct sway_view *view);
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);
void view_update_size(struct sway_view *view, int width, int height);
void view_child_init(struct sway_view_child *child,
const struct sway_view_child_impl *impl, struct sway_view *view,
struct wlr_surface *surface);
void view_child_destroy(struct sway_view_child *child);
#endif