mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-23 16:03:49 -07:00
core: verify surface roles on creation of objects
This commit is contained in:
@@ -133,6 +133,11 @@ CWLSubcompositorResource::CWLSubcompositorResource(SP<CWlSubcompositor> resource
|
||||
return;
|
||||
}
|
||||
|
||||
if (SURF->role->role() != SURFACE_ROLE_UNASSIGNED) {
|
||||
r->error(-1, "Surface already has a different role");
|
||||
return;
|
||||
}
|
||||
|
||||
SP<CWLSurfaceResource> t1Parent = nullptr;
|
||||
|
||||
if (PARENT->role->role() == SURFACE_ROLE_SUBSURFACE) {
|
||||
|
Reference in New Issue
Block a user