aboutsummaryrefslogtreecommitdiffstats
path: root/src/api/wayland
diff options
context:
space:
mode:
authorVictor Berger <victor.berger@m4x.org>2015-05-12 22:47:34 +0200
committerVictor Berger <victor.berger@m4x.org>2015-05-12 22:49:03 +0200
commit310b44f35be8146623d8e5fbbe380ae14f30de72 (patch)
tree8103ea05599c35ea2559f11ef4392702523c17a4 /src/api/wayland
parent3279f15f9f0ff24c644479e73923a0cb64f99fda (diff)
downloadglutin-310b44f35be8146623d8e5fbbe380ae14f30de72.tar.gz
glutin-310b44f35be8146623d8e5fbbe380ae14f30de72.zip
Make platform::linux generic over X11 and Wayland.
Diffstat (limited to 'src/api/wayland')
-rw-r--r--src/api/wayland/mod.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/api/wayland/mod.rs b/src/api/wayland/mod.rs
index f70d62e..4fd0357 100644
--- a/src/api/wayland/mod.rs
+++ b/src/api/wayland/mod.rs
@@ -147,6 +147,10 @@ lazy_static! {
};
}
+pub fn is_available() -> bool {
+ WAYLAND_CONTEXT.is_some()
+}
+
pub struct Window {
shell_surface: ShellSurface<EGLSurface>,
pending_events: Arc<Mutex<VecDeque<Event>>>,