From 5bcdb566c69523edb1ceb857cbf6d0a676cc318d Mon Sep 17 00:00:00 2001 From: Matias Linares Date: Sun, 4 Sep 2016 14:01:37 -0300 Subject: Add Mouse drag support. This concludes the first 'release' :p. --- src/dotwm.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/dotwm.rs') diff --git a/src/dotwm.rs b/src/dotwm.rs index fd28765..248e969 100644 --- a/src/dotwm.rs +++ b/src/dotwm.rs @@ -171,10 +171,18 @@ impl DotWM { } /// Find a given window and returns it's position on the window_list. - pub fn find_window(&self, w: xlib::Window) -> Option { + pub fn window_idx(&self, w: xlib::Window) -> Option { + self.current_desktop().window_idx(w) + } + + pub fn find_window(&self, w: xlib::Window) -> Option<&XWindow> { self.current_desktop().find_window(w) } + pub fn find_window_mut(&mut self, w: xlib::Window) -> Option<&mut XWindow> { + self.current_desktop_mut().find_window_mut(w) + } + /// Focus the next window. /// /// There're 3 posibilities. There's no window, there's one window or there -- cgit v1.2.3-70-g09d2