diff options
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) } |