mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2025-01-11 13:31:29 +11:00
Always dispatch a RedrawRequested event after creating a new window (#1175)
This commit is contained in:
parent
5631cc2528
commit
2b5f9c52a6
|
@ -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.
|
||||
|
|
|
@ -331,8 +331,12 @@ impl WindowBuilder {
|
|||
self,
|
||||
window_target: &EventLoopWindowTarget<T>,
|
||||
) -> Result<Window, OsError> {
|
||||
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 }
|
||||
},
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue