diff options
author | Kirill Primak <vyivel@eclair.cafe> | 2023-02-02 17:16:09 +0300 |
---|---|---|
committer | Kirill Primak <vyivel@eclair.cafe> | 2023-02-02 17:26:25 +0300 |
commit | 911648f430f250daba2d3467b97cf63102b1355c (patch) | |
tree | 26c78fa34b35634c62281bc04d15d58a43e971c5 | |
parent | eb3e8f08a8bb17f9b6260015b901cacbb9b0ce94 (diff) |
subcompositor: fix mapped parent check
-rw-r--r-- | types/wlr_subcompositor.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/types/wlr_subcompositor.c b/types/wlr_subcompositor.c index db4883e2..fe7ea877 100644 --- a/types/wlr_subcompositor.c +++ b/types/wlr_subcompositor.c @@ -183,6 +183,8 @@ static const struct wl_subsurface_interface subsurface_implementation = { .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 * is considered mapped if both: @@ -194,10 +196,13 @@ static void subsurface_consider_map(struct wlr_subsurface *subsurface) { return; } - struct wlr_subsurface *parent = - wlr_subsurface_try_from_wlr_surface(subsurface->parent); - if (parent == NULL || !parent->mapped) { - return; + // TODO: unify "mapped" flag + if (subsurface->parent->role == &subsurface_role) { + struct wlr_subsurface *parent = + wlr_subsurface_try_from_wlr_surface(subsurface->parent); + if (parent == NULL || !parent->mapped) { + return; + } } // Now we can map the subsurface |