From da5870845b424d06789295847e41683fe8d9b2a0 Mon Sep 17 00:00:00 2001 From: Kirill Chibisov Date: Sat, 21 Oct 2023 12:09:26 +0400 Subject: [PATCH] chore: bump winit to 0.29.2 --- glutin-winit/CHANGELOG.md | 2 ++ glutin-winit/Cargo.toml | 5 +++-- glutin-winit/src/lib.rs | 4 ++-- glutin-winit/src/window.rs | 2 +- glutin_examples/Cargo.toml | 5 +++-- glutin_examples/src/lib.rs | 9 +++------ 6 files changed, 14 insertions(+), 13 deletions(-) diff --git a/glutin-winit/CHANGELOG.md b/glutin-winit/CHANGELOG.md index b1c15dbb8b..dd1221dd54 100644 --- a/glutin-winit/CHANGELOG.md +++ b/glutin-winit/CHANGELOG.md @@ -1,5 +1,7 @@ # Unreleased +- **Breaking:** Update _winit_ to `0.29.2`. See [winit's CHANGELOG](https://github.com/rust-windowing/winit/releases/tag/v0.29.2) for more info. + # Version 0.4.1-beta - **Breaking:** Update _winit_ to `0.29.1-beta`. See [winit's CHANGELOG](https://github.com/rust-windowing/winit/releases/tag/v0.29.1-beta) for more info. diff --git a/glutin-winit/Cargo.toml b/glutin-winit/Cargo.toml index 529913b3eb..38849d31b2 100644 --- a/glutin-winit/Cargo.toml +++ b/glutin-winit/Cargo.toml @@ -18,8 +18,9 @@ x11 = ["glutin/x11", "winit/x11"] wayland = ["glutin/wayland", "winit/wayland"] [dependencies] -winit = { version = "0.29.1-beta", default-features = false } -glutin = { version = "0.30.1", path = "../glutin", default-features = false } +glutin = { version = "0.30.10", path = "../glutin", default-features = false } +raw-window-handle = "0.5" +winit = { version = "0.29.2", default-features = false, features = ["rwh_05"] } [build-dependencies] cfg_aliases = "0.1.1" diff --git a/glutin-winit/src/lib.rs b/glutin-winit/src/lib.rs index de6cd5cc9c..d0af719047 100644 --- a/glutin-winit/src/lib.rs +++ b/glutin-winit/src/lib.rs @@ -21,11 +21,11 @@ use glutin::platform::x11::X11GlConfigExt; use glutin::prelude::*; #[cfg(wgl_backend)] -use winit::window::raw_window_handle::HasRawWindowHandle; +use raw_window_handle::HasRawWindowHandle; +use raw_window_handle::{HasRawDisplayHandle, RawWindowHandle}; use winit::error::OsError; use winit::event_loop::EventLoopWindowTarget; -use winit::window::raw_window_handle::{HasRawDisplayHandle, RawWindowHandle}; use winit::window::{Window, WindowBuilder}; #[cfg(glx_backend)] diff --git a/glutin-winit/src/window.rs b/glutin-winit/src/window.rs index b222c6ed10..09d1717f01 100644 --- a/glutin-winit/src/window.rs +++ b/glutin-winit/src/window.rs @@ -5,7 +5,7 @@ use glutin::surface::{ GlSurface, ResizeableSurface, Surface, SurfaceAttributes, SurfaceAttributesBuilder, SurfaceTypeTrait, WindowSurface, }; -use winit::window::raw_window_handle::HasRawWindowHandle; +use raw_window_handle::HasRawWindowHandle; use winit::window::Window; /// [`Window`] extensions for working with [`glutin`] surfaces. diff --git a/glutin_examples/Cargo.toml b/glutin_examples/Cargo.toml index 06b4371254..2da256a749 100644 --- a/glutin_examples/Cargo.toml +++ b/glutin_examples/Cargo.toml @@ -20,12 +20,13 @@ wayland = ["glutin-winit/wayland", "winit/wayland-dlopen", "winit/wayland-csd-ad [dependencies] glutin = { path = "../glutin", default-features = false } -winit = { version = "0.29.1-beta", default-features = false } glutin-winit = { path = "../glutin-winit", default-features = false } png = { version = "0.17.6", optional = true } +raw-window-handle = "0.5" +winit = { version = "0.29.2", default-features = false, features = ["rwh_05"] } [target.'cfg(target_os = "android")'.dependencies] -winit = { version = "0.29.1-beta", default-features = false, features = ["android-native-activity"] } +winit = { version = "0.29.2", default-features = false, features = ["android-native-activity", "rwh_05"] } [build-dependencies] gl_generator = "0.14" diff --git a/glutin_examples/src/lib.rs b/glutin_examples/src/lib.rs index 46ab5da24e..7956eae108 100644 --- a/glutin_examples/src/lib.rs +++ b/glutin_examples/src/lib.rs @@ -3,8 +3,8 @@ use std::ffi::{CStr, CString}; use std::num::NonZeroU32; use std::ops::Deref; +use raw_window_handle::HasRawWindowHandle; use winit::event::{Event, WindowEvent}; -use winit::window::raw_window_handle::HasRawWindowHandle; use winit::window::WindowBuilder; use glutin::config::ConfigTemplateBuilder; @@ -100,8 +100,7 @@ pub fn main(event_loop: winit::event_loop::EventLoop<()>) -> Result<(), Box { #[cfg(android_platform)] @@ -166,9 +165,7 @@ pub fn main(event_loop: winit::event_loop::EventLoop<()>) -> Result<(), Box { - control_flow.set_exit(); - }, + WindowEvent::CloseRequested => window_target.exit(), _ => (), }, Event::AboutToWait => {