From 310b44f35be8146623d8e5fbbe380ae14f30de72 Mon Sep 17 00:00:00 2001 From: Victor Berger Date: Tue, 12 May 2015 22:47:34 +0200 Subject: Make platform::linux generic over X11 and Wayland. --- src/api/wayland/mod.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/api/wayland') 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, pending_events: Arc>>, -- cgit v1.2.3