wayland/output: avoid sending events to dead outputs

ref #6835
This commit is contained in:
Vaxry
2024-07-22 16:56:51 +02:00
parent 83a5395eaa
commit 5bae7f150b
3 changed files with 12 additions and 7 deletions

View File

@@ -49,7 +49,7 @@ SP<CWlOutput> CWLOutputResource::getResource() {
}
void CWLOutputResource::updateState() {
if (!monitor)
if (!monitor || (owner && owner->defunct))
return;
if (resource->version() >= 2)
@@ -83,7 +83,8 @@ void CWLOutputProtocol::bindManager(wl_client* client, void* data, uint32_t ver,
return;
}
RESOURCE->self = RESOURCE;
RESOURCE->self = RESOURCE;
RESOURCE->owner = self;
}
void CWLOutputProtocol::destroyResource(CWLOutputResource* resource) {