summaryrefslogtreecommitdiff
path: root/src/protocols
diff options
context:
space:
mode:
authorVaxry <vaxry@vaxry.net>2025-07-17 22:04:14 +0200
committerVaxry <vaxry@vaxry.net>2025-07-17 22:04:20 +0200
commita05c797e4a7b32f933569aec6cfba180bc693528 (patch)
treef08f9d6b3fc5edf089d2908ad7a07a93d9b858c9 /src/protocols
parentb46dc9ee0c62ad825f79511dd2b4aaeffc274048 (diff)
compositor: properly set infinite region on null input
fixes #11065
Diffstat (limited to 'src/protocols')
-rw-r--r--src/protocols/core/Compositor.cpp2
-rw-r--r--src/protocols/types/SurfaceState.hpp12
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;