mirror of
https://github.com/tauri-apps/window-shadows.git
synced 2026-02-04 02:31:23 +01:00
chore(deps): update rust crate winit to 0.29 (#57)
* chore(deps): update rust crate winit to 0.29 * fix example --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Amr Bashir <amr.bashir2015@gmail.com>
This commit is contained in:
@@ -20,7 +20,7 @@ raw-window-handle = "0.5"
|
||||
|
||||
[dev-dependencies]
|
||||
tao = "0.23"
|
||||
winit = "0.28"
|
||||
winit = {version = "0.29", default-features = false, features = ["rwh_05"] }
|
||||
|
||||
[target."cfg(target_os = \"windows\")".dependencies]
|
||||
windows-sys = { version = "0.48.0", features = [
|
||||
|
||||
@@ -10,7 +10,7 @@ fn main() {
|
||||
window::WindowBuilder,
|
||||
};
|
||||
|
||||
let event_loop = EventLoop::new();
|
||||
let event_loop = EventLoop::new().unwrap();
|
||||
|
||||
let window = WindowBuilder::new()
|
||||
.with_decorations(false)
|
||||
@@ -21,14 +21,14 @@ fn main() {
|
||||
|
||||
window.set_title("A fantastic window!");
|
||||
|
||||
event_loop.run(move |event, _, control_flow| {
|
||||
*control_flow = ControlFlow::Wait;
|
||||
event_loop.run(move |event, event_loop| {
|
||||
event_loop.set_control_flow(ControlFlow::Wait);
|
||||
|
||||
match event {
|
||||
Event::WindowEvent {
|
||||
event: WindowEvent::CloseRequested,
|
||||
..
|
||||
} => *control_flow = ControlFlow::Exit,
|
||||
} => event_loop.exit(),
|
||||
_ => (),
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user