Skip to content

Commit

Permalink
Wayland: Fix window creation dimensions (#577)
Browse files Browse the repository at this point in the history
* Wayland: Fix window creation dimensions

* Wayland: Fix window creation min/max
  • Loading branch information
francesca64 authored Jun 24, 2018
1 parent 047c67b commit c873c2d
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/platform/linux/wayland/window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@ pub struct Window {

impl Window {
pub fn new(evlp: &EventsLoop, attributes: WindowAttributes) -> Result<Window, CreationError> {
// 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)));

Expand Down Expand Up @@ -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));
Expand Down

0 comments on commit c873c2d

Please sign in to comment.