aboutsummaryrefslogtreecommitdiff
path: root/src/dotwm.rs
diff options
context:
space:
mode:
authorMatias Linares <matiaslina@openmailbox.org>2016-09-04 14:01:37 -0300
committerMatias Linares <matiaslina@openmailbox.org>2016-09-04 14:01:37 -0300
commit5bcdb566c69523edb1ceb857cbf6d0a676cc318d (patch)
treed3506fee02510999128fdfb5ec6a84ca99c9962b /src/dotwm.rs
parent67306a1f063f15bc8127cdc2f72f971f2d06dd69 (diff)
downloaddotwm-5bcdb566c69523edb1ceb857cbf6d0a676cc318d.tar.gz
Add Mouse drag support.
This concludes the first 'release' :p.
Diffstat (limited to 'src/dotwm.rs')
-rw-r--r--src/dotwm.rs10
1 files changed, 9 insertions, 1 deletions
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<usize> {
+ pub fn window_idx(&self, w: xlib::Window) -> Option<usize> {
+ 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