Don't pass invalid positioner size on popup reconfigure

Mentioned in #144
This commit is contained in:
Shawn Wallace 2025-05-28 22:24:54 -04:00
parent 76ace3c656
commit ae1759077e
3 changed files with 48 additions and 7 deletions

View file

@ -2073,6 +2073,31 @@ fn fractional_scale_small_popup() {
.expect("Missing popup data");
let pos = &data.popup().positioner_state;
assert_eq!(pos.size.unwrap(), testwl::Vec2 { x: 1, y: 1 });
f.satellite.reconfigure_window(x::ConfigureNotifyEvent::new(
popup,
popup,
x::WINDOW_NONE,
0,
0,
2,
1,
0,
true,
));
f.run();
f.run();
let dims = f.connection().window(popup).dims;
assert!(dims.width > 0);
assert!(dims.height > 0);
let data = f
.testwl
.get_surface_data(popup_id)
.expect("Missing popup data");
let pos = &data.popup().positioner_state;
assert_eq!(pos.size.unwrap(), testwl::Vec2 { x: 1, y: 1 });
}
#[test]