mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-22 04:45:58 +01:00
parent
4e513c93bd
commit
37b5f8a89e
2 changed files with 8 additions and 17 deletions
|
@ -754,6 +754,14 @@ void wlr_surface_unmap(struct wlr_surface *surface) {
|
||||||
if (surface->role != NULL && surface->role->unmap != NULL) {
|
if (surface->role != NULL && surface->role->unmap != NULL) {
|
||||||
surface->role->unmap(surface);
|
surface->role->unmap(surface);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
struct wlr_subsurface *subsurface;
|
||||||
|
wl_list_for_each(subsurface, &surface->current.subsurfaces_below, current.link) {
|
||||||
|
wlr_surface_unmap(subsurface->surface);
|
||||||
|
}
|
||||||
|
wl_list_for_each(subsurface, &surface->current.subsurfaces_above, current.link) {
|
||||||
|
wlr_surface_unmap(subsurface->surface);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wlr_surface_set_role(struct wlr_surface *surface,
|
bool wlr_surface_set_role(struct wlr_surface *surface,
|
||||||
|
|
|
@ -220,22 +220,6 @@ static void subsurface_role_commit(struct wlr_surface *surface) {
|
||||||
subsurface_consider_map(subsurface);
|
subsurface_consider_map(subsurface);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void subsurface_role_unmap(struct wlr_surface *surface) {
|
|
||||||
struct wlr_subsurface *subsurface = wlr_subsurface_try_from_wlr_surface(surface);
|
|
||||||
assert(subsurface != NULL);
|
|
||||||
|
|
||||||
// Unmap all children
|
|
||||||
struct wlr_subsurface *child;
|
|
||||||
wl_list_for_each(child, &subsurface->surface->current.subsurfaces_below,
|
|
||||||
current.link) {
|
|
||||||
wlr_surface_unmap(child->surface);
|
|
||||||
}
|
|
||||||
wl_list_for_each(child, &subsurface->surface->current.subsurfaces_above,
|
|
||||||
current.link) {
|
|
||||||
wlr_surface_unmap(child->surface);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void subsurface_role_destroy(struct wlr_surface *surface) {
|
static void subsurface_role_destroy(struct wlr_surface *surface) {
|
||||||
struct wlr_subsurface *subsurface = wlr_subsurface_try_from_wlr_surface(surface);
|
struct wlr_subsurface *subsurface = wlr_subsurface_try_from_wlr_surface(surface);
|
||||||
assert(subsurface != NULL);
|
assert(subsurface != NULL);
|
||||||
|
@ -259,7 +243,6 @@ static void subsurface_role_destroy(struct wlr_surface *surface) {
|
||||||
const struct wlr_surface_role subsurface_role = {
|
const struct wlr_surface_role subsurface_role = {
|
||||||
.name = "wl_subsurface",
|
.name = "wl_subsurface",
|
||||||
.commit = subsurface_role_commit,
|
.commit = subsurface_role_commit,
|
||||||
.unmap = subsurface_role_unmap,
|
|
||||||
.destroy = subsurface_role_destroy,
|
.destroy = subsurface_role_destroy,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue