mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2025-01-27 03:56:33 +11:00
Wayland: Fix window creation dimensions (#577)
* Wayland: Fix window creation dimensions * Wayland: Fix window creation min/max
This commit is contained in:
parent
047c67baf3
commit
c873c2db15
1 changed files with 3 additions and 6 deletions
|
@ -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));
|
||||||
|
|
Loading…
Add table
Reference in a new issue