diff options
Diffstat (limited to 'winit/src/conversion.rs')
-rw-r--r-- | winit/src/conversion.rs | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/winit/src/conversion.rs b/winit/src/conversion.rs index 0ed10c88..aaaca1a9 100644 --- a/winit/src/conversion.rs +++ b/winit/src/conversion.rs @@ -79,6 +79,10 @@ pub fn window_attributes( attributes = attributes .with_skip_taskbar(settings.platform_specific.skip_taskbar); + + attributes = attributes.with_undecorated_shadow( + settings.platform_specific.undecorated_shadow, + ); } #[cfg(target_os = "macos")] @@ -101,10 +105,14 @@ pub fn window_attributes( { use winit::platform::x11::WindowAttributesExtX11; - attributes = attributes.with_name( - &settings.platform_specific.application_id, - &settings.platform_specific.application_id, - ); + attributes = attributes + .with_override_redirect( + settings.platform_specific.override_redirect, + ) + .with_name( + &settings.platform_specific.application_id, + &settings.platform_specific.application_id, + ); } #[cfg(feature = "wayland")] { @@ -132,10 +140,10 @@ pub fn window_event( WindowEvent::Resized(new_size) => { let logical_size = new_size.to_logical(scale_factor); - Some(Event::Window(window::Event::Resized { + Some(Event::Window(window::Event::Resized(Size { width: logical_size.width, height: logical_size.height, - })) + }))) } WindowEvent::CloseRequested => { Some(Event::Window(window::Event::CloseRequested)) @@ -277,7 +285,7 @@ pub fn window_event( let winit::dpi::LogicalPosition { x, y } = position.to_logical(scale_factor); - Some(Event::Window(window::Event::Moved { x, y })) + Some(Event::Window(window::Event::Moved(Point::new(x, y)))) } _ => None, } |