diff options
| author | Vaxry <vaxry@vaxry.net> | 2025-07-17 22:04:14 +0200 |
|---|---|---|
| committer | Vaxry <vaxry@vaxry.net> | 2025-07-17 22:04:20 +0200 |
| commit | a05c797e4a7b32f933569aec6cfba180bc693528 (patch) | |
| tree | f08f9d6b3fc5edf089d2908ad7a07a93d9b858c9 /src | |
| parent | b46dc9ee0c62ad825f79511dd2b4aaeffc274048 (diff) | |
compositor: properly set infinite region on null input
fixes #11065
Diffstat (limited to 'src')
| -rw-r--r-- | src/protocols/core/Compositor.cpp | 2 | ||||
| -rw-r--r-- | src/protocols/types/SurfaceState.hpp | 12 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/protocols/core/Compositor.cpp b/src/protocols/core/Compositor.cpp index 21f9e0a7..5efe020c 100644 --- a/src/protocols/core/Compositor.cpp +++ b/src/protocols/core/Compositor.cpp @@ -219,7 +219,7 @@ CWLSurfaceResource::CWLSurfaceResource(SP<CWlSurface> resource_) : m_resource(re m_pending.updated.bits.input = true; if (!region) { - m_pending.input = CBox{{}, m_pending.bufferSize}; + m_pending.input = CBox{{}, Vector2D{INT32_MAX - 1, INT32_MAX - 1}}; return; } diff --git a/src/protocols/types/SurfaceState.hpp b/src/protocols/types/SurfaceState.hpp index 0876709a..e11692cf 100644 --- a/src/protocols/types/SurfaceState.hpp +++ b/src/protocols/types/SurfaceState.hpp @@ -26,12 +26,12 @@ struct SSurfaceState { bool rejected = false; // initial values, copied from protocol text - CHLBufferReference buffer = {}; // The initial surface contents are void - CRegion damage, bufferDamage; // The initial value for pending damage is empty - CRegion opaque; // The initial value for an opaque region is empty - CRegion input = CBox{{}, {INT32_MAX, INT32_MAX}}; // The initial value for an input region is infinite - wl_output_transform transform = WL_OUTPUT_TRANSFORM_NORMAL; // A newly created surface has its buffer transformation set to normal - int scale = 1; // A newly created surface has its buffer scale set to 1 + CHLBufferReference buffer = {}; // The initial surface contents are void + CRegion damage, bufferDamage; // The initial value for pending damage is empty + CRegion opaque; // The initial value for an opaque region is empty + CRegion input = CBox{{}, {INT32_MAX - 1, INT32_MAX - 1}}; // The initial value for an input region is infinite + wl_output_transform transform = WL_OUTPUT_TRANSFORM_NORMAL; // A newly created surface has its buffer transformation set to normal + int scale = 1; // A newly created surface has its buffer scale set to 1 // these don't have well defined initial values in the protocol, but these work Vector2D size, bufferSize; |
