WaylandDisplay

class WaylandDisplay(**properties: Any)

Superclasses: Display, Object

The Wayland implementation of GdkDisplay.

Beyond the regular Display API, the Wayland implementation provides access to Wayland objects such as the wl_display with get_wl_display, the wl_compositor with get_wl_compositor.

You can find out what Wayland globals are supported by a display with query_registry.

Methods

class WaylandDisplay
get_egl_display() None

Retrieves the EGL display connection object for the given GDK display.

Added in version 4.4.

get_startup_notification_id() str | None

Gets the startup notification ID for a Wayland display, or None if no ID has been defined.

Deprecated since version 4.10.: Please do not use it in newly written code

query_registry(global_: str) bool

Returns True if the interface was found in the display wl_registry.global handler.

Parameters:

global

set_cursor_theme(name: str, size: int) None

Sets the cursor theme for the given display.

Parameters:
  • name – the new cursor theme

  • size – the size to use for cursors

set_startup_notification_id(startup_id: str) None

Sets the startup notification ID for a display.

This is usually taken from the value of the DESKTOP_STARTUP_ID environment variable, but in some cases (such as the application not being launched using exec()) it can come from other sources.

The startup ID is also what is used to signal that the startup is complete (for example, when opening a window or when calling notify_startup_complete).

Deprecated since version 4.10.: Use set_startup_id

Parameters:

startup_id – the startup notification ID (must be valid utf8)