Migrate away from Rectangle::from_loc_and_size

Deprecated in `smithay` by https://github.com/Smithay/smithay/pull/1621.
This commit is contained in:
Ian Douglas Scott 2024-12-26 18:18:35 -08:00 committed by Victoria Brekenfeld
parent 9074447c4f
commit b685512127
26 changed files with 184 additions and 201 deletions

View file

@ -271,7 +271,7 @@ pub fn minimize_rectangle(output: &Output, window: &CosmicSurface) -> Rectangle<
let map = layer_map_for_output(output);
let layer = map.layer_for_surface(&surface, WindowSurfaceType::ALL);
layer.and_then(|s| map.layer_geometry(s)).map(|local| {
Rectangle::from_loc_and_size(
Rectangle::new(
Point::from((local.loc.x + relative.loc.x, local.loc.y + relative.loc.y)),
relative.size,
)
@ -279,7 +279,7 @@ pub fn minimize_rectangle(output: &Output, window: &CosmicSurface) -> Rectangle<
})
.unwrap_or_else(|| {
let output_size = output.geometry().size;
Rectangle::from_loc_and_size(
Rectangle::new(
Point::from((
(output_size.w / 2) - 100,
output_size.h - (output_size.h / 3) - 50,