mirror of
https://github.com/rust-windowing/winit.git
synced 2026-09-02 06:40:06 -04:00
Wayland: Fix window creation dimensions (#577)
* Wayland: Fix window creation dimensions * Wayland: Fix window creation min/max
This commit is contained in:
committed by
GitHub
parent
047c67baf3
commit
c873c2db15
@@ -29,9 +29,7 @@ pub struct Window {
|
|||||||
|
|
||||||
impl Window {
|
impl Window {
|
||||||
pub fn new(evlp: &EventsLoop, attributes: WindowAttributes) -> Result<Window, CreationError> {
|
pub fn new(evlp: &EventsLoop, attributes: WindowAttributes) -> Result<Window, CreationError> {
|
||||||
// TODO: Update for new DPI API
|
let (width, height) = attributes.dimensions.map(Into::into).unwrap_or((800, 600));
|
||||||
//let (width, height) = attributes.dimensions.unwrap_or((800, 600));
|
|
||||||
let (width, height) = (64, 64);
|
|
||||||
// Create the window
|
// Create the window
|
||||||
let size = Arc::new(Mutex::new((width, height)));
|
let size = Arc::new(Mutex::new((width, height)));
|
||||||
|
|
||||||
@@ -131,9 +129,8 @@ impl Window {
|
|||||||
frame.set_decorate(attributes.decorations);
|
frame.set_decorate(attributes.decorations);
|
||||||
|
|
||||||
// min-max dimensions
|
// min-max dimensions
|
||||||
// TODO: Update for new DPI API
|
frame.set_min_size(attributes.min_dimensions.map(Into::into));
|
||||||
//frame.set_min_size(attributes.min_dimensions);
|
frame.set_max_size(attributes.max_dimensions.map(Into::into));
|
||||||
//frame.set_max_size(attributes.max_dimensions);
|
|
||||||
|
|
||||||
let kill_switch = Arc::new(Mutex::new(false));
|
let kill_switch = Arc::new(Mutex::new(false));
|
||||||
let need_frame_refresh = Arc::new(Mutex::new(true));
|
let need_frame_refresh = Arc::new(Mutex::new(true));
|
||||||
|
|||||||
Reference in New Issue
Block a user