1
0
Fork 0

send initial window resized event in x11

This commit is contained in:
Billy Messenger 2021-07-14 11:44:00 -05:00
parent d399c12755
commit d316c6ae54

View file

@ -200,6 +200,13 @@ impl Window {
let mut handler = build(&mut crate::Window::new(&mut window)); let mut handler = build(&mut crate::Window::new(&mut window));
// Send an initial window resized event so the use is alerted of
// the correct dpi scaling.
handler.on_event(
&mut crate::Window::new(&mut window),
Event::Window(WindowEvent::Resized(window_info))
);
let _ = tx.send(Ok(SendableRwh(window.raw_window_handle()))); let _ = tx.send(Ok(SendableRwh(window.raw_window_handle())));
window.run_event_loop(&mut handler); window.run_event_loop(&mut handler);