diff options
author | Matias Linares <matiaslina@openmailbox.org> | 2016-01-27 12:27:34 -0300 |
---|---|---|
committer | Matias Linares <matiaslina@openmailbox.org> | 2016-01-27 12:27:34 -0300 |
commit | 5d7d8a19f6364dfb6e6583125ced3103d069f2b3 (patch) | |
tree | d6906802f0427fd843783dba1d608cf3c54fcd82 /src/safe_x11/mod.rs | |
parent | f7a827971f436d9d493cff9ecb7fe91958f71be1 (diff) | |
download | dotwm-5d7d8a19f6364dfb6e6583125ced3103d069f2b3.tar.gz |
Refactor move sticky.
Diffstat (limited to 'src/safe_x11/mod.rs')
-rw-r--r-- | src/safe_x11/mod.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/safe_x11/mod.rs b/src/safe_x11/mod.rs index 9e5859a..03c54d8 100644 --- a/src/safe_x11/mod.rs +++ b/src/safe_x11/mod.rs @@ -16,9 +16,11 @@ use x11::xlib::{ XEvent, XNextEvent, + XDefaultGC, // Windows Window, + GC, Atom, XInternAtom, }; @@ -226,6 +228,11 @@ fn get_color<T: Into<Vec<u8>>>(display: *mut Display, color: T) -> u64{ } } +fn default_gc(display: *mut Display) -> GC { + let screen_num = unsafe { xlib::XDefaultScreen(display) }; + unsafe { XDefaultGC(display, screen_num) } +} + /// Get the keysym for the given event. pub fn lookup_keysym(ev: &mut XKeyEvent) -> xlib::KeySym { unsafe { xlib::XLookupKeysym(ev, 0) } |