1
0
Fork 0

x11: fix potential missed resize events

This commit is contained in:
William Light 2020-09-14 06:21:25 +02:00
parent a59ccae56f
commit c26507c322

View file

@ -311,10 +311,12 @@ impl Window {
xcb::CONFIGURE_NOTIFY => {
let event = unsafe { xcb::cast_event::<xcb::ConfigureNotifyEvent>(&event) };
let (width, height) = (event.width() as u32, event.height() as u32);
if width != self.window_info.width || height != self.window_info.height {
self.new_size = Some((width, height));
let new_size = (event.width() as u32, event.height() as u32);
let cur_size = (self.window_info.width, self.window_info.height);
if self.new_size.is_some() || new_size != cur_size {
self.new_size = Some(new_size);
}
}