diff options
author | tcmal <me@aria.rip> | 2024-08-13 17:56:39 +0100 |
---|---|---|
committer | tcmal <me@aria.rip> | 2024-08-13 21:48:11 +0100 |
commit | e4d9484d0e1ebcf496d0606800560c09d2753df4 (patch) | |
tree | 23931a1cba89ca75e592c7351022bf7b22c487a8 /src/helpers.rs | |
parent | d973959f7f34e02eeb01766b01aff680639a8c4c (diff) |
Add moving and resizing with mouse
Diffstat (limited to 'src/helpers.rs')
-rw-r--r-- | src/helpers.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/helpers.rs b/src/helpers.rs index cc76e43..175eea9 100644 --- a/src/helpers.rs +++ b/src/helpers.rs @@ -82,3 +82,17 @@ pub fn set_tag(wm: &mut WM<'_>, tag: Tag) { wm.clients.set_client_tag(&wm.conn, pos, tag); } } + +/// Move the currently focused window with the mouse +pub fn mouse_move(wm: &mut WM<'_>) { + if let Err(e) = wm.mouse_move() { + println!("error when moving with mouse: {:?}", e); + } +} + +/// Resize the currently focused window with the mouse +pub fn mouse_resize(wm: &mut WM<'_>) { + if let Err(e) = wm.mouse_resize() { + println!("error when resizing with mouse: {:?}", e); + } +} |