From 3bc5d11219f987be95be74701a8ba74a680fe84e Mon Sep 17 00:00:00 2001 From: Madeline Sparkles Date: Sun, 14 Jul 2024 01:13:22 +0800 Subject: [PATCH] update winit to 0.30 (#178) * update winit to 0.30 * fully commenting out the is_init stuff until further notice * remove fixmes * regroup winit imports * cleanup some * fix build * revert removal of is_init bugfix and rename handle_event to handle_window_event * simplify is_init logic --- crates/bootstrap/src/lib.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/crates/bootstrap/src/lib.rs b/crates/bootstrap/src/lib.rs index 09c7835f..bbd56cd5 100644 --- a/crates/bootstrap/src/lib.rs +++ b/crates/bootstrap/src/lib.rs @@ -6,7 +6,6 @@ use std::time::Instant; use winit::{ application::ApplicationHandler, - dpi::LogicalSize, event::{StartCause, WindowEvent}, event_loop::{ActiveEventLoop, ControlFlow, EventLoop}, window::{Window, WindowAttributes, WindowId}, @@ -228,9 +227,7 @@ fn run(body: impl ExampleBody) { // Normal winit setup for an EventLoop and Window. let event_loop = EventLoop::new().unwrap(); - let attributes = WindowAttributes::default() - .with_title(title) - .with_inner_size(LogicalSize::new(800.0, 600.0)); + let window_attribute = Window::default_attributes().with_title(title); // Create our yakui state. This is where our UI will be built, laid out, and // calculations for painting will happen. @@ -252,7 +249,7 @@ fn run(body: impl ExampleBody) { // Set up some default state that we'll modify later. let mut app = App { yak, - attributes, + attributes: window_attribute, start: Instant::now(), state: ExampleState { time: 0.0,