compositor/surface: fix surface opaque and input regions not being updated (#10055)

This commit is contained in:
Ikalco 2025-04-12 11:58:29 -05:00 committed by GitHub
parent a17cea8b8c
commit 2da4f427ea
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -195,25 +195,25 @@ CWLSurfaceResource::CWLSurfaceResource(SP<CWlSurface> resource_) : resource(reso
}); });
resource->setSetInputRegion([this](CWlSurface* r, wl_resource* region) { resource->setSetInputRegion([this](CWlSurface* r, wl_resource* region) {
pending.updated.input = true;
if (!region) { if (!region) {
pending.input = CBox{{}, {INT32_MAX, INT32_MAX}}; pending.input = CBox{{}, {INT32_MAX, INT32_MAX}};
return; return;
} }
pending.updated.input = true;
auto RG = CWLRegionResource::fromResource(region); auto RG = CWLRegionResource::fromResource(region);
pending.input = RG->region; pending.input = RG->region;
}); });
resource->setSetOpaqueRegion([this](CWlSurface* r, wl_resource* region) { resource->setSetOpaqueRegion([this](CWlSurface* r, wl_resource* region) {
pending.updated.opaque = true;
if (!region) { if (!region) {
pending.opaque = CBox{{}, {}}; pending.opaque = CBox{{}, {}};
return; return;
} }
pending.updated.opaque = true;
auto RG = CWLRegionResource::fromResource(region); auto RG = CWLRegionResource::fromResource(region);
pending.opaque = RG->region; pending.opaque = RG->region;
}); });