From 3e08fa9edbcf9b29d533bc13624ee9d74869dcfe Mon Sep 17 00:00:00 2001 From: Ian Douglas Scott Date: Fri, 10 Jan 2025 14:32:10 -0800 Subject: [PATCH 1/4] Update `xkbcommon` and `image` --- Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 60894a2..052d5fa 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,11 +9,11 @@ cgmath = "0.18" egui = "0.29" egui_glow = "0.29" egui_extras = { version = "0.29", optional = true } -img = { version = "0.24", default-features = false, optional = true, package = "image" } +img = { version = "0.25", default-features = false, optional = true, package = "image" } memoffset = "0.9" lazy_static = { version = "1.4.0", optional = true } log = "0.4" -xkbcommon = "0.7" +xkbcommon = "0.8" [dependencies.smithay] version = "0.3" From baa43a79a8c37426bd7456d775eb5fa78c243366 Mon Sep 17 00:00:00 2001 From: Ian Douglas Scott Date: Fri, 10 Jan 2025 14:35:47 -0800 Subject: [PATCH 2/4] Update `egui` to `0.30` --- Cargo.toml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 052d5fa..b25340f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,9 +6,9 @@ license = "MIT" [dependencies] cgmath = "0.18" -egui = "0.29" -egui_glow = "0.29" -egui_extras = { version = "0.29", optional = true } +egui = "0.30" +egui_glow = "0.30" +egui_extras = { version = "0.30", optional = true } img = { version = "0.25", default-features = false, optional = true, package = "image" } memoffset = "0.9" lazy_static = { version = "1.4.0", optional = true } @@ -34,7 +34,7 @@ jpg = ["image", "egui_extras/image", "img/jpeg"] [dev-dependencies] anyhow = "1.0" -egui_demo_lib = "0.29" +egui_demo_lib = "0.30" tracing-subscriber = "0.3" [dev-dependencies.smithay] From d8d1d08592c27435776a5c40c94161f4636fab80 Mon Sep 17 00:00:00 2001 From: Ian Douglas Scott Date: Fri, 10 Jan 2025 14:54:16 -0800 Subject: [PATCH 3/4] Update smithay --- Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index b25340f..d24e2a5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,7 +18,7 @@ xkbcommon = "0.8" [dependencies.smithay] version = "0.3" git = "https://github.com/Smithay/smithay.git" -rev = "3b0ecce" +rev = "fe31867" default-features = false features = ["renderer_glow", "wayland_frontend"] @@ -40,6 +40,6 @@ tracing-subscriber = "0.3" [dev-dependencies.smithay] version = "0.3" git = "https://github.com/Smithay/smithay.git" -rev = "3b0ecce" +rev = "fe31867" default-features = false features = ["backend_winit"] From 5d4c1965d03e443d076389524daf7d62de677f6a Mon Sep 17 00:00:00 2001 From: Ian Douglas Scott Date: Fri, 10 Jan 2025 14:58:23 -0800 Subject: [PATCH 4/4] Do not use deprecated `smithay` function --- examples/integrate.rs | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/examples/integrate.rs b/examples/integrate.rs index ae3fe40..cfe623c 100644 --- a/examples/integrate.rs +++ b/examples/integrate.rs @@ -47,10 +47,7 @@ fn main() -> Result<()> { let (mut backend, mut input) = winit::init::().map_err(|_| anyhow::anyhow!("Winit failed to start"))?; // create an `EguiState`. Usually this would be part of your global smithay state - let egui = EguiState::new(Rectangle::from_loc_and_size( - (0, 0), - backend.window_size().to_logical(1), - )); + let egui = EguiState::new(Rectangle::from_size(backend.window_size().to_logical(1))); // you might also need additional structs to store your ui-state, like the demo_lib does let mut demo_ui = egui_demo_lib::DemoWindows::default(); @@ -164,7 +161,7 @@ fn main() -> Result<()> { |ctx| demo_ui.ui(ctx), backend.renderer(), // Just render it over the whole window, but you may limit the area - Rectangle::from_loc_and_size((0, 0), size.to_logical(1)), + Rectangle::from_size(size.to_logical(1)), // we also completely ignore the scale *everywhere* in this example, but egui is HiDPI-ready 1.0, 1.0, @@ -176,16 +173,13 @@ fn main() -> Result<()> { let renderer = backend.renderer(); { let mut frame = renderer.render(size, Transform::Flipped180)?; - frame.clear( - [1.0, 1.0, 1.0, 1.0].into(), - &[Rectangle::from_loc_and_size((0, 0), size)], - )?; + frame.clear([1.0, 1.0, 1.0, 1.0].into(), &[Rectangle::from_size(size)])?; RenderElement::::draw( &egui_frame, &mut frame, egui_frame.src(), egui_frame.geometry(1.0.into()), - &[Rectangle::from_loc_and_size((0, 0), size)], + &[Rectangle::from_size(size)], &[], )?; }