diff --git a/src/x11/window.rs b/src/x11/window.rs index 9128f65..aebed48 100644 --- a/src/x11/window.rs +++ b/src/x11/window.rs @@ -200,6 +200,13 @@ impl 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()))); window.run_event_loop(&mut handler);