diff options
author | Matias Linares <matiaslina@openmailbox.org> | 2016-09-04 14:01:37 -0300 |
---|---|---|
committer | Matias Linares <matiaslina@openmailbox.org> | 2016-09-04 14:01:37 -0300 |
commit | 5bcdb566c69523edb1ceb857cbf6d0a676cc318d (patch) | |
tree | d3506fee02510999128fdfb5ec6a84ca99c9962b /src/safe_x11/mod.rs | |
parent | 67306a1f063f15bc8127cdc2f72f971f2d06dd69 (diff) | |
download | dotwm-5bcdb566c69523edb1ceb857cbf6d0a676cc318d.tar.gz |
Add Mouse drag support.
This concludes the first 'release' :p.
Diffstat (limited to 'src/safe_x11/mod.rs')
-rw-r--r-- | src/safe_x11/mod.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/safe_x11/mod.rs b/src/safe_x11/mod.rs index 613424a..4a1e029 100644 --- a/src/safe_x11/mod.rs +++ b/src/safe_x11/mod.rs @@ -137,6 +137,14 @@ pub fn grab_button(display: *mut Display, button: u32, modifiers: u32, } } +/// Unregister a combination of keys that will send a `XEvent` +pub fn ungrab_button(display: *mut Display, button: u32, modifiers: u32) { + unsafe { + let default_win = xlib::XDefaultRootWindow(display); + xlib::XUngrabButton(display, button, modifiers, default_win); + } +} + /// Register a combination of keys that will send a `XEvent` /// pub fn grab_key(display: *mut Display, key: u32, modifiers: u32, owner_events: bool, |