core: verify surface roles on creation of objects
This commit is contained in:
parent
10e02076b1
commit
211353dc34
5 changed files with 55 additions and 9 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue