From ee8b5afc88e32389955f10dd01c417a0c4e45711 Mon Sep 17 00:00:00 2001 From: Lars Bergstrom Date: Sun, 15 Dec 2013 19:04:03 -0600 Subject: [PATCH] Always use the same display connection --- azure_hl.rs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/azure_hl.rs b/azure_hl.rs index 81e55ff..881bb32 100644 --- a/azure_hl.rs +++ b/azure_hl.rs @@ -740,13 +740,8 @@ pub fn current_display() -> *c_void { #[cfg(target_os="linux")] pub fn current_graphics_metadata() -> NativeGraphicsMetadata { - use xlib::xlib::XDisplayString; - use std::c_str::CString; - unsafe { - let c_str = CString::new(XDisplayString(current_display()), false); - NativeGraphicsMetadata { - display: c_str.as_str().unwrap().to_str(), - } + NativeGraphicsMetadata { + display: current_display(), } }