Go to index / Go to protocols

hyprland_surface_v1 ↗

hyprland-specific wl_surface extensions

This protocol exposes hyprland-specific wl_surface properties.

hyprland_surface_v1
hyprland_surface_manager_v1

Version 2
Compositor Support
Version 2
hyprland 0.52.1

manager for hyprland surface objects

This interface allows a client to create hyprland surface objects.

hyprland_surface_manager_v1
request get_hyprland_surface(
    id: new_id<hyprland_surface_v1>,
    surface: object<wl_surface>,
)

    create a hyprland surface object

    Create a hyprland surface object for the given wayland surface.

    If the wl_surface already has an associated hyprland_surface_v1 object, even from a different manager, creation is a protocol error.

    hyprland_surface_manager_v1
    request destroy()
    Destructor

      destroy the hyprland surface manager

      Destroy the surface manager. This does not destroy existing surface objects.

      hyprland_surface_manager_v1
      enum error {
          already_constructed = 0,
      }
      • already_constructed — wl_surface already has a hyprland surface object

      hyprland_surface_v1
      hyprland_surface_v1

      Version 2

      hyprland-specific wl_surface properties

      This interface allows access to hyprland-specific properties of a wl_surface.

      Once the wl_surface has been destroyed, the hyprland surface object must be destroyed as well. All other operations are a protocol error.

      hyprland_surface_v1
      request set_opacity(
          opacity: fixed,
      )

        set the overall opacity of the surface

        Sets a multiplier for the overall opacity of the surface. This multiplier applies to visual effects such as blur behind the surface in addition to the surface's content.

        The default value is 1.0. Setting a value outside of the range 0.0 - 1.0 (inclusive) is a protocol error. Does not take effect until wl_surface.commit is called.

        hyprland_surface_v1
        request destroy()
        Destructor

          destroy the hyprland surface interface

          Destroy the hyprland surface object, resetting properties provided by this interface to their default values on the next wl_surface.commit.

          hyprland_surface_v1
          enum error {
              no_surface = 0,
              out_of_range = 1,
          }
          • no_surface — wl_surface was destroyed
          • out_of_range — given opacity was not in the range 0.0 - 1.0 (inclusive)
          hyprland_surface_v1
          request set_visible_region(
              region: nullable object<wl_region>,
          )
          Available since version 2

            set the visible region of the surface

            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.