x11: fix potential missed resize events
This commit is contained in:
parent
a59ccae56f
commit
c26507c322
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue