From 5758ab13d65e37a6a1ef085d2f56842dfa254235 Mon Sep 17 00:00:00 2001 From: outfoxxed Date: Wed, 22 Jan 2025 06:36:32 -0800 Subject: [PATCH] hyprland-surface: add set_visible_region (#13) Allows the clients to specify which region of the surface is supposed to be rendered --- protocols/hyprland-surface-v1.xml | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/protocols/hyprland-surface-v1.xml b/protocols/hyprland-surface-v1.xml index 2f68336..c4b1424 100644 --- a/protocols/hyprland-surface-v1.xml +++ b/protocols/hyprland-surface-v1.xml @@ -34,7 +34,7 @@ This protocol exposes hyprland-specific wl_surface properties. - + This interface allows a client to create hyprland surface objects. @@ -63,7 +63,7 @@ - + This interface allows access to hyprland-specific properties of a wl_surface. @@ -96,5 +96,31 @@ + + + + This request sets the region of the surface that contains visible content. + Visible content refers to content that has an alpha value greater than zero. + + The visible region is an optimization hint for the compositor that lets it + avoid drawing parts of the surface that are not visible. Setting a visible region + that does not contain all content in the surface may result in missing content + not being drawn. + + The visible region is specified in buffer-local coordinates. + + The compositor ignores the parts of the visible region that fall outside of the surface. + When all parts of the region fall outside of the buffer geometry, the compositor may + avoid rendering the surface entirely. + + The initial value for the visible region is empty. Setting the + visible region has copy semantics, and the wl_region object can be destroyed immediately. + A NULL wl_region causes the visible region to be set to empty. + + Does not take effect until wl_surface.commit is called. + + + +