Go to index / Go to protocols

treeland_screensaver_v1 ↗

screensaver control for treeland

Warning! This protocol is EXPERIMENTAL and under active development. It may change at any time, including in backward-incompatible ways, without incrementing the interface major version and without prior notice. No compatibility guarantees of any kind are provided. Clients and compositors must track the upstream definition in treeland-protocols and must not rely on the current interface names, requests, events, or semantics remaining stable across releases.

treeland_screensaver_v1
treeland_screensaver_v1

Version 2

Simple idle inhibit protocol

This object implements a simple idle inhibit protocol used to implement org.freedesktop.ScreenSaver D-Bus interface.

Call inhibit to prevent treeland from entering idle state. Call uninhibit or disconnect from the global to release the inhibit.

If the client disconnects from the compositor, the inhibit associated with that client is automatically released.

There can be only one inhibit per client per time. Calling inhibit multiple times will raise an error. Call uninhibit before inhibit to update application_name and reason recorded.

treeland_screensaver_v1
request inhibit(
    application_name: string,
    reason_for_inhibit: string,
)
  • application_name — name of the application requesting the inhibit
  • reason_for_inhibit — human-readable reason for the inhibit request

Inhibit idleness

Inhibit idleness with given application_name and reason_for_inhibit.

treeland_screensaver_v1
request uninhibit()

    Uninhibit idleness

    Uninhibit idleness previously inhibited by inhibit request.

    treeland_screensaver_v1
    request destroy()
    DestructorAvailable since version 2

      destroy treeland_screensaver_v1 object

      treeland_screensaver_v1
      enum error {
          not_yet_inhibited = 0,
          already_inhibited = 1,
      }
      • not_yet_inhibited — Trying to uninhibit but no active inhibit existed
      • already_inhibited — Trying to inhibit with an active inhibit existed