Bump MSRV to 1.85 and edition to 2024
This commit is contained in:
parent
10f21090ce
commit
c333003514
110 changed files with 432 additions and 574 deletions
|
|
@ -8,8 +8,8 @@ use std::error::Error;
|
|||
use std::fmt::Debug;
|
||||
#[cfg(not(android_platform))]
|
||||
use std::num::NonZeroU32;
|
||||
use std::sync::mpsc::{self, Receiver, Sender};
|
||||
use std::sync::Arc;
|
||||
use std::sync::mpsc::{self, Receiver, Sender};
|
||||
#[cfg(all(not(android_platform), not(web_platform)))]
|
||||
use std::time::Instant;
|
||||
use std::{fmt, mem};
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ changelog entry.
|
|||
- `ActiveEventLoop::create_window` now returns `Box<dyn Window>`.
|
||||
- `ApplicationHandler` now uses `dyn ActiveEventLoop`.
|
||||
- On Web, let events wake up event loop immediately when using `ControlFlow::Poll`.
|
||||
- Bump MSRV from `1.70` to `1.80`.
|
||||
- Bump MSRV from `1.70` to `1.85`.
|
||||
- Changed `ApplicationHandler::user_event` to `user_wake_up`, removing the
|
||||
generic user event.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,4 @@
|
|||
#[allow(unused_macros)]
|
||||
macro_rules! os_error {
|
||||
($error:expr) => {{
|
||||
winit_core::error::OsError::new(line!(), file!(), $error)
|
||||
}};
|
||||
($error:expr) => {{ winit_core::error::OsError::new(line!(), file!(), $error) }};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -93,8 +93,10 @@ impl WindowExtStartupNotify for dyn Window + '_ {
|
|||
/// This is wise to do before running child processes,
|
||||
/// which may not to support the activation token.
|
||||
pub fn reset_activation_token_env() {
|
||||
env::remove_var(X11_VAR);
|
||||
env::remove_var(WAYLAND_VAR);
|
||||
unsafe {
|
||||
env::remove_var(X11_VAR);
|
||||
env::remove_var(WAYLAND_VAR);
|
||||
}
|
||||
}
|
||||
|
||||
/// Set environment variables responsible for activation token.
|
||||
|
|
@ -102,6 +104,8 @@ pub fn reset_activation_token_env() {
|
|||
/// This could be used before running daemon processes.
|
||||
pub fn set_activation_token_env(token: ActivationToken) {
|
||||
let token = token.into_raw();
|
||||
env::set_var(X11_VAR, &token);
|
||||
env::set_var(WAYLAND_VAR, token);
|
||||
unsafe {
|
||||
env::set_var(X11_VAR, &token);
|
||||
env::set_var(WAYLAND_VAR, token);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,8 +10,8 @@ use std::time::Duration;
|
|||
pub(crate) use winit_common::xkb::{physicalkey_to_scancode, scancode_to_physicalkey};
|
||||
use winit_core::application::ApplicationHandler;
|
||||
use winit_core::error::{EventLoopError, NotSupportedError};
|
||||
use winit_core::event_loop::pump_events::PumpStatus;
|
||||
use winit_core::event_loop::ActiveEventLoop;
|
||||
use winit_core::event_loop::pump_events::PumpStatus;
|
||||
#[cfg(wayland_platform)]
|
||||
pub(crate) use winit_wayland as wayland;
|
||||
#[cfg(x11_platform)]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue