impl Default for WindowBuilder (#1373)

This commit is contained in:
Bastian Kauschke 2020-01-07 20:33:56 +01:00 committed by Osspial
parent 6b0875728c
commit 02ac7456e4
2 changed files with 3 additions and 5 deletions

View file

@ -2,6 +2,7 @@
- On Windows, fix bug where `RedrawRequested` would only get emitted every other iteration of the event loop.
- On X11, fix deadlock on window state when handling certain window events.
- `WindowBuilder` now implements `Default`.
# 0.20.0 (2020-01-05)

View file

@ -78,7 +78,7 @@ impl WindowId {
}
/// Object that allows you to build windows.
#[derive(Clone)]
#[derive(Clone, Default)]
pub struct WindowBuilder {
/// The attributes to use to create the window.
pub window: WindowAttributes,
@ -185,10 +185,7 @@ impl WindowBuilder {
/// Initializes a new `WindowBuilder` with default values.
#[inline]
pub fn new() -> Self {
WindowBuilder {
window: Default::default(),
platform_specific: Default::default(),
}
Default::default()
}
/// Requests the window to be of specific dimensions.