1
0
Fork 0
forked from wry/wry

rect: safer construction

This commit is contained in:
Stipe Kotarac 2025-12-29 10:42:17 +01:00 committed by Julian Orth
parent 411af0ea18
commit a1dfc473a2
33 changed files with 245 additions and 159 deletions

View file

@ -142,7 +142,7 @@ impl XwindowData {
let mut width = event.width as i32;
let mut height = event.height as i32;
client_wire_scale_to_logical!(client, x, y, width, height);
let extents = Rect::new_sized(x, y, width, height).unwrap();
let extents = Rect::new_sized_saturating(x, y, width, height);
// log::info!("xwin {} new {:?} or {}", event.window, extents, event.override_redirect);
Self {
state: state.clone(),