Skip to content

Commit d316c6a

Browse files
Billy MessengerBilly Messenger
authored andcommitted
send initial window resized event in x11
1 parent d399c12 commit d316c6a

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

src/x11/window.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,13 @@ impl Window {
200200

201201
let mut handler = build(&mut crate::Window::new(&mut window));
202202

203+
// Send an initial window resized event so the use is alerted of
204+
// the correct dpi scaling.
205+
handler.on_event(
206+
&mut crate::Window::new(&mut window),
207+
Event::Window(WindowEvent::Resized(window_info))
208+
);
209+
203210
let _ = tx.send(Ok(SendableRwh(window.raw_window_handle())));
204211

205212
window.run_event_loop(&mut handler);

0 commit comments

Comments
 (0)