diff --git a/CHANGELOG.md b/CHANGELOG.md index e5764e40..c27607e5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ - On macOS, fix events not being emitted during modal loops, such as when windows are being resized by the user. - On Windows, fix hovering the mouse over the active window creating an endless stream of CursorMoved events. +- Always dispatch a `RedrawRequested` event after creating a new window. - On X11, return dummy monitor data to avoid panicking when no monitors exist. - On X11, prevent stealing input focus when creating a new window. Only steal input focus when entering fullscreen mode. diff --git a/src/window.rs b/src/window.rs index 23c73e91..8384cb23 100644 --- a/src/window.rs +++ b/src/window.rs @@ -331,8 +331,12 @@ impl WindowBuilder { self, window_target: &EventLoopWindowTarget, ) -> Result { - platform_impl::Window::new(&window_target.p, self.window, self.platform_specific) - .map(|window| Window { window }) + platform_impl::Window::new(&window_target.p, self.window, self.platform_specific).map( + |window| { + window.request_redraw(); + Window { window } + }, + ) } }