Update winit and glutin dependencies
... and remove crates.io patch
This commit is contained in:
parent
b97954a1ee
commit
82db3c78b6
4 changed files with 9 additions and 19 deletions
|
|
@ -93,9 +93,6 @@ iced_core = { version = "0.4", path = "core" }
|
||||||
iced_futures = { version = "0.3", path = "futures" }
|
iced_futures = { version = "0.3", path = "futures" }
|
||||||
thiserror = "1.0"
|
thiserror = "1.0"
|
||||||
|
|
||||||
[patch.crates-io]
|
|
||||||
winit = { git = "https://github.com/iced-rs/winit", rev = "327c8756f90953a6a03f818113f8566176e6eb0d"}
|
|
||||||
|
|
||||||
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
|
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
|
||||||
iced_winit = { version = "0.3", path = "winit" }
|
iced_winit = { version = "0.3", path = "winit" }
|
||||||
iced_glutin = { version = "0.2", path = "glutin", optional = true }
|
iced_glutin = { version = "0.2", path = "glutin", optional = true }
|
||||||
|
|
|
||||||
|
|
@ -15,8 +15,8 @@ debug = ["iced_winit/debug"]
|
||||||
|
|
||||||
[dependencies.glutin]
|
[dependencies.glutin]
|
||||||
version = "0.27"
|
version = "0.27"
|
||||||
# git = "https://github.com/iced-rs/glutin"
|
git = "https://github.com/iced-rs/glutin"
|
||||||
# rev = "2564d0ab87cf2ad824a2a58733aebe40dd2f29bb"
|
rev = "03437d8a1826d83c62017b2bb7bf18bfc9e352cc"
|
||||||
|
|
||||||
[dependencies.iced_native]
|
[dependencies.iced_native]
|
||||||
version = "0.4"
|
version = "0.4"
|
||||||
|
|
|
||||||
|
|
@ -20,8 +20,8 @@ thiserror = "1.0"
|
||||||
|
|
||||||
[dependencies.winit]
|
[dependencies.winit]
|
||||||
version = "0.25"
|
version = "0.25"
|
||||||
# git = "https://github.com/iced-rs/winit"
|
git = "https://github.com/iced-rs/winit"
|
||||||
# rev = "e351421a32bf01b428325dde44dea39ee2656153"
|
rev = "844485272a7412cb35cdbfac3524decdf59475ca"
|
||||||
|
|
||||||
[dependencies.iced_native]
|
[dependencies.iced_native]
|
||||||
version = "0.4"
|
version = "0.4"
|
||||||
|
|
|
||||||
|
|
@ -218,17 +218,15 @@ pub fn menu<Message>(menu: &Menu<Message>) -> winit::window::Menu {
|
||||||
|
|
||||||
/// Given a [`Menu`] and an identifier of a [`menu::Entry`], it returns the
|
/// Given a [`Menu`] and an identifier of a [`menu::Entry`], it returns the
|
||||||
/// `Message` that should be produced when that entry is activated.
|
/// `Message` that should be produced when that entry is activated.
|
||||||
pub fn menu_message<Message>(menu: &Menu<Message>, id: isize) -> Option<Message>
|
pub fn menu_message<Message>(menu: &Menu<Message>, id: u32) -> Option<Message>
|
||||||
where
|
where
|
||||||
Message: Clone,
|
Message: Clone,
|
||||||
{
|
{
|
||||||
use std::convert::TryFrom;
|
|
||||||
|
|
||||||
fn find_message<Message>(
|
fn find_message<Message>(
|
||||||
target: usize,
|
target: u32,
|
||||||
starting_id: usize,
|
starting_id: u32,
|
||||||
menu: &Menu<Message>,
|
menu: &Menu<Message>,
|
||||||
) -> Result<Message, usize>
|
) -> Result<Message, u32>
|
||||||
where
|
where
|
||||||
Message: Clone,
|
Message: Clone,
|
||||||
{
|
{
|
||||||
|
|
@ -260,12 +258,7 @@ where
|
||||||
Err(id - starting_id)
|
Err(id - starting_id)
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Does `winit` really need to provide an `isize`?
|
find_message(id, 0, menu).ok()
|
||||||
if let Ok(id) = usize::try_from(id) {
|
|
||||||
find_message(id, 0, menu).ok()
|
|
||||||
} else {
|
|
||||||
None
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Converts a `MouseCursor` from [`iced_native`] to a [`winit`] cursor icon.
|
/// Converts a `MouseCursor` from [`iced_native`] to a [`winit`] cursor icon.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue