Skip to content

Commit

Permalink
Always dispatch a RedrawRequested event after creating a new window (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
Osspial authored Oct 17, 2019
1 parent 5631cc2 commit 2b5f9c5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
8 changes: 6 additions & 2 deletions src/window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
},
)
}
}

Expand Down

0 comments on commit 2b5f9c5

Please sign in to comment.