W3cubDocs

/GTK 4.0

Using GTK with Wayland

The GDK Wayland backend provides support for running GTK applications under a Wayland compositor. To run your application in this way, select the Wayland backend by setting GDK_BACKEND=wayland.

On UNIX, the Wayland backend is enabled by default, so you don’t need to do anything special when compiling it, and everything should just work.

WAYLAND_DISPLAY

Specifies the name of the Wayland display to use. Typically, wayland-0 or wayland-1.

XDG_RUNTIME_DIR

Used to locate the Wayland socket to use.

© 2005–2020 The GNOME Project
Licensed under the GNU Lesser General Public License version 2.1 or later.
https://developer.gnome.org/gtk4/4.0/gtk-wayland.html