diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2025-01-04 10:14:51 +0300 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2025-01-04 11:22:56 +0300 |
| commit | a2f9d132a088e399fb1f292d84d3d3862127f02e (patch) | |
| tree | 0e04941d8ae35be9362c53f8d41177cc71e24214 /src/niri.rs | |
| parent | 1973b97cc2a51d697add3d9ad7210a4e6eba9183 (diff) | |
| download | niri-a2f9d132a088e399fb1f292d84d3d3862127f02e.tar.gz niri-a2f9d132a088e399fb1f292d84d3d3862127f02e.tar.bz2 niri-a2f9d132a088e399fb1f292d84d3d3862127f02e.zip | |
Migrate to new Rectangle functions
Diffstat (limited to 'src/niri.rs')
| -rw-r--r-- | src/niri.rs | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/niri.rs b/src/niri.rs index 198e079e..8ac85270 100644 --- a/src/niri.rs +++ b/src/niri.rs @@ -2169,7 +2169,7 @@ impl Niri { .map(|pos| Point::from((pos.x, pos.y))) .filter(|pos| { // Ensure that the requested position does not overlap any existing output. - let target_geom = Rectangle::from_loc_and_size(*pos, size); + let target_geom = Rectangle::new(*pos, size); let overlap = self .global_space @@ -2651,9 +2651,9 @@ impl Niri { pub fn output_left(&self) -> Option<Output> { let active = self.layout.active_output()?; let active_geo = self.global_space.output_geometry(active).unwrap(); - let extended_geo = Rectangle::from_loc_and_size( - (i32::MIN / 2, active_geo.loc.y), - (i32::MAX, active_geo.size.h), + let extended_geo = Rectangle::new( + Point::from((i32::MIN / 2, active_geo.loc.y)), + Size::from((i32::MAX, active_geo.size.h)), ); self.global_space @@ -2668,9 +2668,9 @@ impl Niri { pub fn output_right(&self) -> Option<Output> { let active = self.layout.active_output()?; let active_geo = self.global_space.output_geometry(active).unwrap(); - let extended_geo = Rectangle::from_loc_and_size( - (i32::MIN / 2, active_geo.loc.y), - (i32::MAX, active_geo.size.h), + let extended_geo = Rectangle::new( + Point::from((i32::MIN / 2, active_geo.loc.y)), + Size::from((i32::MAX, active_geo.size.h)), ); self.global_space @@ -2685,9 +2685,9 @@ impl Niri { pub fn output_up(&self) -> Option<Output> { let active = self.layout.active_output()?; let active_geo = self.global_space.output_geometry(active).unwrap(); - let extended_geo = Rectangle::from_loc_and_size( - (active_geo.loc.x, i32::MIN / 2), - (active_geo.size.w, i32::MAX), + let extended_geo = Rectangle::new( + Point::from((active_geo.loc.x, i32::MIN / 2)), + Size::from((active_geo.size.w, i32::MAX)), ); self.global_space @@ -2746,9 +2746,9 @@ impl Niri { pub fn output_down(&self) -> Option<Output> { let active = self.layout.active_output()?; let active_geo = self.global_space.output_geometry(active).unwrap(); - let extended_geo = Rectangle::from_loc_and_size( - (active_geo.loc.x, i32::MIN / 2), - (active_geo.size.w, i32::MAX), + let extended_geo = Rectangle::new( + Point::from((active_geo.loc.x, i32::MIN / 2)), + Size::from((active_geo.size.w, i32::MAX)), ); self.global_space |
