summaryrefslogtreecommitdiff
path: root/src/dotwm.rs
diff options
context:
space:
mode:
authorMatias Linares <matiaslina@openmailbox.org>2015-11-15 19:07:57 -0300
committerMatias Linares <matiaslina@openmailbox.org>2015-11-15 19:07:57 -0300
commit12af9d3ec0d55c258d10e73e8fe6a99f3c9f05ff (patch)
treef7a22b899d714902a07da2f3d66cb0c4261bb6d6 /src/dotwm.rs
parent9eb8d5c3e10bda16c9edf5e8f430662a6c404093 (diff)
downloaddotwm-12af9d3ec0d55c258d10e73e8fe6a99f3c9f05ff.tar.gz
Move exec and add binding to the main.
The bindings don't need to be handled on the window manager This would be useful for the client/server feature.
Diffstat (limited to 'src/dotwm.rs')
-rw-r--r--src/dotwm.rs41
1 files changed, 0 insertions, 41 deletions
diff --git a/src/dotwm.rs b/src/dotwm.rs
index 952fc8c..e94b17f 100644
--- a/src/dotwm.rs
+++ b/src/dotwm.rs
@@ -55,47 +55,6 @@ impl DotWM {
window_list: vec![],
}
}
-
- /// Add a binding to the WM.
- ///
- /// # Example
- ///
- /// ```
- /// fn exec(_: &DotWM, _: xlib::XEvent, args: &[String]) -> bool {
- /// if let Some(program) = args.first() {
- /// let mut prog_args = vec![];
- /// for arg in args[1..].iter() {
- /// prog_args.push(arg);
- /// }
- /// exec_cmd(program, prog_args.deref()).unwrap();
- /// }
- /// true
- /// }
- ///
- /// // ...
- ///
- /// dotwm.add_binding(keysym::XK_Return, xlib::Mod4Mask, exec,
- /// &["xterm"]);
- /// ```
- /*
- pub fn add_binding(&mut self, key: u32, modifiers: u32, func: ExecFn, args: &[&str]) {
- grab_key(self.display, key, modifiers, true, GrabModeAsync, GrabModeAsync);
- let mut v = vec![];
- for arg in args {
- v.push(arg.to_string());
- }
- self.bindings.insert((key, modifiers), (func, v));
- }
- */
-
- /*
- pub fn exec_func(&mut self, key: u32, modifiers: u32, ev: xlib::XEvent) {
- if let Some(&(func, ref args)) = self.bindings.get(&(key, modifiers)) {
- let v = args.clone();
- func(&self, ev, &v);
- }
- }
- */
pub fn add_window(&mut self, w: xlib::Window) {
self.unfocus_current_window();