From 12faa87415d91820503b6b1c98ebabbddc50d665 Mon Sep 17 00:00:00 2001 From: Matias Linares Date: Mon, 30 Nov 2015 22:50:01 -0300 Subject: Add resize-win-sticky. The move window sticky is working weirdly. The movement should be using the attrs.x and attrs.y instead the attrs.x/y + attrs.width/height. But it's working :). --- src/socket/mod.rs | 2 +- src/socket/parser.rs | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'src/socket') diff --git a/src/socket/mod.rs b/src/socket/mod.rs index 667969b..66dae16 100644 --- a/src/socket/mod.rs +++ b/src/socket/mod.rs @@ -27,7 +27,7 @@ impl<'a> ParsedCmd<'a> { pub fn handle(self, wm: &mut DotWM, bindings: &mut BindingHash) { match self.f { FnType::Bind => { - let modifier = self.modifiers.iter() + let modifier: u32 = self.modifiers.iter() .fold(0, |acc, x| acc | x ); add_binding(wm, bindings, self.key, modifier, self.func, &self.args); diff --git a/src/socket/parser.rs b/src/socket/parser.rs index 491c315..bd73ff6 100644 --- a/src/socket/parser.rs +++ b/src/socket/parser.rs @@ -22,10 +22,11 @@ macro_rules! simple_try { } fn modifier_from<'a>(s: &'a str) -> Result { + println!("Getted modifier {}", s); match s { - "Mod1" => Ok(xlib::Mod4Mask), - "Mod2" => Ok(xlib::Mod4Mask), - "Mod3" => Ok(xlib::Mod4Mask), + "Mod1" => Ok(xlib::Mod1Mask), + "Mod2" => Ok(xlib::Mod2Mask), + "Mod3" => Ok(xlib::Mod3Mask), "Mod4" => Ok(xlib::Mod4Mask), "Control" => Ok(xlib::ControlMask), "Shift" => Ok(xlib::ShiftMask), @@ -111,6 +112,7 @@ fn func<'a>(s: &'a str) -> Result { "move-win-to" => Ok(move_win_to), "move-win-sticky" => Ok(move_win_sticky), "resize-win" => Ok(resize_win), + "resize-win-sticky" => Ok(resize_win_sticky), "focus-next" => Ok(focus_next), "close-win" => Ok(close_win), "fullscreen" => Ok(fullscreen), -- cgit v1.2.3-70-g09d2