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

@ -124,7 +124,7 @@ impl OverlapNotifyState {
if let Some(window_geo) = window.global_geometry() {
if let Some(intersection) = layer_geo.intersection(window_geo) {
// relative to layer location
let region = Rectangle::from_loc_and_size(
let region = Rectangle::new(
intersection.loc - layer_geo.loc,
intersection.size,
)
@ -145,7 +145,7 @@ impl OverlapNotifyState {
.to_global(&output);
if let Some(intersection) = layer_geo.intersection(other_geo) {
// relative to layer location
let region = Rectangle::from_loc_and_size(
let region = Rectangle::new(
intersection.loc - layer_geo.loc,
intersection.size,
)

View file

@ -870,7 +870,7 @@ where
inner
.damage
.push(Rectangle::from_loc_and_size((x, y), (width, height)));
.push(Rectangle::new((x, y).into(), (width, height).into()));
}
zcosmic_screencopy_frame_v2::Request::Capture => {
let mut inner = data.inner.lock().unwrap();

View file

@ -244,7 +244,7 @@ where
} else {
toplevel_state.rectangles.push((
surface.downgrade(),
Rectangle::from_loc_and_size((x, y), (width, height)),
Rectangle::new((x, y).into(), (width, height).into()),
));
}
}