From c873c2db1508bb420e7fa0518e6727c31154e1b8 Mon Sep 17 00:00:00 2001 From: Francesca Frangipane Date: Sun, 24 Jun 2018 08:28:57 -0400 Subject: [PATCH] Wayland: Fix window creation dimensions (#577) * Wayland: Fix window creation dimensions * Wayland: Fix window creation min/max --- src/platform/linux/wayland/window.rs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/platform/linux/wayland/window.rs b/src/platform/linux/wayland/window.rs index 6a774612..f1ad26df 100644 --- a/src/platform/linux/wayland/window.rs +++ b/src/platform/linux/wayland/window.rs @@ -29,9 +29,7 @@ pub struct Window { impl Window { pub fn new(evlp: &EventsLoop, attributes: WindowAttributes) -> Result { - // TODO: Update for new DPI API - //let (width, height) = attributes.dimensions.unwrap_or((800, 600)); - let (width, height) = (64, 64); + let (width, height) = attributes.dimensions.map(Into::into).unwrap_or((800, 600)); // Create the window let size = Arc::new(Mutex::new((width, height))); @@ -131,9 +129,8 @@ impl Window { frame.set_decorate(attributes.decorations); // min-max dimensions - // TODO: Update for new DPI API - //frame.set_min_size(attributes.min_dimensions); - //frame.set_max_size(attributes.max_dimensions); + frame.set_min_size(attributes.min_dimensions.map(Into::into)); + frame.set_max_size(attributes.max_dimensions.map(Into::into)); let kill_switch = Arc::new(Mutex::new(false)); let need_frame_refresh = Arc::new(Mutex::new(true));