From 2da4f427ea97a11d1d28dfd1324984a8584fc699 Mon Sep 17 00:00:00 2001 From: Ikalco <73481042+ikalco@users.noreply.github.com> Date: Sat, 12 Apr 2025 11:58:29 -0500 Subject: [PATCH] compositor/surface: fix surface opaque and input regions not being updated (#10055) --- src/protocols/core/Compositor.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/protocols/core/Compositor.cpp b/src/protocols/core/Compositor.cpp index 57f0ff3f..3cc04cda 100644 --- a/src/protocols/core/Compositor.cpp +++ b/src/protocols/core/Compositor.cpp @@ -195,25 +195,25 @@ CWLSurfaceResource::CWLSurfaceResource(SP resource_) : resource(reso }); resource->setSetInputRegion([this](CWlSurface* r, wl_resource* region) { + pending.updated.input = true; + if (!region) { pending.input = CBox{{}, {INT32_MAX, INT32_MAX}}; return; } - pending.updated.input = true; - auto RG = CWLRegionResource::fromResource(region); pending.input = RG->region; }); resource->setSetOpaqueRegion([this](CWlSurface* r, wl_resource* region) { + pending.updated.opaque = true; + if (!region) { pending.opaque = CBox{{}, {}}; return; } - pending.updated.opaque = true; - auto RG = CWLRegionResource::fromResource(region); pending.opaque = RG->region; });