summaryrefslogtreecommitdiff
path: root/src/dotwm.rs
diff options
context:
space:
mode:
authorMatias Linares <matiaslina@openmailbox.org>2016-05-25 13:18:18 -0300
committerMatias Linares <matiaslina@openmailbox.org>2016-05-25 13:18:18 -0300
commitda3fa00ccf4cde76d1d6489c6043d7e56d4f52c5 (patch)
tree49dbdb5ce9d0baed54ee41a64393b01b6953f2e6 /src/dotwm.rs
parent77e4450afef9fb5d1acb8f2b690bd5e228f61d8e (diff)
downloaddotwm-da3fa00ccf4cde76d1d6489c6043d7e56d4f52c5.tar.gz
Add a lazy_static connection to the X server
Diffstat (limited to 'src/dotwm.rs')
-rw-r--r--src/dotwm.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/dotwm.rs b/src/dotwm.rs
index 2781ae8..666deff 100644
--- a/src/dotwm.rs
+++ b/src/dotwm.rs
@@ -9,7 +9,6 @@ use x11::xlib::{
};
use safe_x11::{
- open_display,
close_display,
atom,
};
@@ -79,7 +78,7 @@ pub struct DotWM {
impl DotWM {
/// Create a state of the Dot Window Manager
pub fn new() -> DotWM {
- let d = open_display("").unwrap();
+ let d = unsafe { xlib::XOpenDisplay(0x0 as *const i8) };
unsafe { xlib::XSetErrorHandler(Some(error_handler)) };
// Add substructure notify mask