Merge pull request #199 from alexheretic/xwayland-env-var
Add a `WINIT_UNIX_BACKEND` environment variable to all the user to control the choice of x11/wayland backend.
This commit is contained in:
commit
05cd9f2114
3 changed files with 71 additions and 14 deletions
10
src/lib.rs
10
src/lib.rs
|
|
@ -1,4 +1,4 @@
|
|||
//! Winit allows you to build a window on as many platforms as possible.
|
||||
//! Winit allows you to build a window on as many platforms as possible.
|
||||
//!
|
||||
//! # Building a window
|
||||
//!
|
||||
|
|
@ -181,6 +181,14 @@ pub struct ButtonId(u32);
|
|||
/// Provides a way to retreive events from the windows that were registered to it.
|
||||
///
|
||||
/// To wake up an `EventsLoop` from a another thread, see the `EventsLoopProxy` docs.
|
||||
///
|
||||
/// 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.
|
||||
pub struct EventsLoop {
|
||||
events_loop: platform::EventsLoop,
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue