Function winit::get_primary_monitor [] [src]

pub fn get_primary_monitor() -> MonitorId

Returns the primary monitor of the system.

Usage will result in display backend initialisation, this can be controlled on linux using an environment variable WINIT_UNIX_BACKEND.

Legal values are x11 and wayland. If this variable is set only the named backend will be tried by winit. If it is not set, winit will try to connect to a wayland connection, and if it fails will fallback on x11.

If this variable is set with any other value, winit will panic.