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

@ -851,8 +851,8 @@ impl<C: XConnection> ServerState<C> {
((event.y() as i32 - win.output_offset.y) as f64 / data.scale_factor) as i32,
);
popup.positioner.set_size(
(event.width() as f64 / data.scale_factor) as i32,
(event.height() as f64 / data.scale_factor) as i32,
1.max((event.width() as f64 / data.scale_factor) as i32),
1.max((event.height() as f64 / data.scale_factor) as i32),
);
popup.popup.reposition(&popup.positioner, 0);
}