1
1
mirror of https://github.com/wez/wezterm.git synced 2024-11-23 15:04:36 +03:00

window: populate live_resizing for x11/wayland

We don't really know for sure, but we can make a reasonable deduction on
X11.

refs: https://github.com/wez/wezterm/issues/1491
This commit is contained in:
Wez Furlong 2022-01-03 08:38:03 -07:00
parent 0224f65fed
commit 49904eac9c
2 changed files with 7 additions and 0 deletions

View File

@ -629,6 +629,9 @@ impl WaylandWindowInner {
self.events.dispatch(WindowEvent::Resized {
dimensions: self.dimensions,
window_state: self.window_state,
// We don't know if we're live resizing or not, so
// assume no.
live_resizing: false,
});
if let Some(wegl_surface) = self.wegl_surface.as_mut() {
wegl_surface.resize(pixel_width, pixel_height, 0, 0);

View File

@ -161,6 +161,7 @@ impl XWindowInner {
dpi: self.dpi as usize,
},
window_state: self.get_window_state().unwrap_or(WindowState::default()),
live_resizing: false,
});
}
}
@ -264,6 +265,9 @@ impl XWindowInner {
self.queue_pending(WindowEvent::Resized {
dimensions,
window_state: self.get_window_state().unwrap_or(WindowState::default()),
// Assume that we're live resizing: we don't know for sure,
// but it seems like a reasonable assumption
live_resizing: true,
});
}
xcb::KEY_PRESS | xcb::KEY_RELEASE => {