diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2023-08-13 12:46:53 +0400 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2023-08-13 12:46:53 +0400 |
| commit | 95c810c855a27a28f4dfa7dc6b949fef0901c7b2 (patch) | |
| tree | c240dd8d8c6eac7cd18c507fbe35724ca7de8aeb /src/grabs/move_grab.rs | |
| parent | e02e35f9c61e103a01640d3dc95a894e8855e1c9 (diff) | |
| download | niri-95c810c855a27a28f4dfa7dc6b949fef0901c7b2.tar.gz niri-95c810c855a27a28f4dfa7dc6b949fef0901c7b2.tar.bz2 niri-95c810c855a27a28f4dfa7dc6b949fef0901c7b2.zip | |
Refactor everything, add initial tiling code
Diffstat (limited to 'src/grabs/move_grab.rs')
| -rw-r--r-- | src/grabs/move_grab.rs | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/grabs/move_grab.rs b/src/grabs/move_grab.rs index 699921d1..67a1f285 100644 --- a/src/grabs/move_grab.rs +++ b/src/grabs/move_grab.rs @@ -5,6 +5,7 @@ use smithay::input::pointer::{ }; use smithay::reexports::wayland_server::protocol::wl_surface::WlSurface; use smithay::utils::{Logical, Point}; +use smithay::wayland::seat::WaylandFocus; use crate::Niri; @@ -25,10 +26,13 @@ impl PointerGrab<Niri> for MoveSurfaceGrab { // While the grab is active, no client has pointer focus handle.motion(data, None, event); - let delta = event.location - self.start_data.location; - let new_location = self.initial_window_location.to_f64() + delta; - data.space - .map_element(self.window.clone(), new_location.to_i32_round(), true); + // let delta = event.location - self.start_data.location; + // let new_location = self.initial_window_location.to_f64() + delta; + // let (window, space) = data + // .monitor_set + // .find_window_and_space(self.window.wl_surface().as_ref().unwrap()) + // .unwrap(); + // space.map_element(window.clone(), new_location.to_i32_round(), true); } fn relative_motion( |
