mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2024-11-22 07:02:28 +00:00
subcompositor: fix mapped parent check
This commit is contained in:
parent
eb3e8f08a8
commit
911648f430
@ -183,6 +183,8 @@ static const struct wl_subsurface_interface subsurface_implementation = {
|
|||||||
.set_desync = subsurface_handle_set_desync,
|
.set_desync = subsurface_handle_set_desync,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const struct wlr_surface_role subsurface_role;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if this subsurface needs to be marked as mapped. The subsurface
|
* Checks if this subsurface needs to be marked as mapped. The subsurface
|
||||||
* is considered mapped if both:
|
* is considered mapped if both:
|
||||||
@ -194,10 +196,13 @@ static void subsurface_consider_map(struct wlr_subsurface *subsurface) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct wlr_subsurface *parent =
|
// TODO: unify "mapped" flag
|
||||||
wlr_subsurface_try_from_wlr_surface(subsurface->parent);
|
if (subsurface->parent->role == &subsurface_role) {
|
||||||
if (parent == NULL || !parent->mapped) {
|
struct wlr_subsurface *parent =
|
||||||
return;
|
wlr_subsurface_try_from_wlr_surface(subsurface->parent);
|
||||||
|
if (parent == NULL || !parent->mapped) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Now we can map the subsurface
|
// Now we can map the subsurface
|
||||||
|
Loading…
Reference in New Issue
Block a user