Skip to content

Commit 0e1a9e6

Browse files
committed
Merge branch 'master' into 0.8
2 parents f1db675 + 2b87429 commit 0e1a9e6

File tree

3 files changed

+11
-10
lines changed

3 files changed

+11
-10
lines changed

native/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "iced_native"
3-
version = "0.9.0"
3+
version = "0.9.1"
44
authors = ["Héctor Ramón Jiménez <[email protected]>"]
55
edition = "2021"
66
description = "A renderer-agnostic library for native GUIs"

native/src/image.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ impl Handle {
2828
pub fn from_pixels(
2929
width: u32,
3030
height: u32,
31-
pixels: impl AsRef<[u8]> + Clone + Send + Sync + 'static,
31+
pixels: impl AsRef<[u8]> + Send + Sync + 'static,
3232
) -> Handle {
3333
Self::from_data(Data::Rgba {
3434
width,
@@ -44,7 +44,7 @@ impl Handle {
4444
/// This is useful if you already have your image loaded in-memory, maybe
4545
/// because you downloaded or generated it procedurally.
4646
pub fn from_memory(
47-
bytes: impl AsRef<[u8]> + Clone + Send + Sync + 'static,
47+
bytes: impl AsRef<[u8]> + Send + Sync + 'static,
4848
) -> Handle {
4949
Self::from_data(Data::Bytes(Bytes::new(bytes)))
5050
}
@@ -93,7 +93,7 @@ pub struct Bytes(Arc<dyn AsRef<[u8]> + Send + Sync + 'static>);
9393

9494
impl Bytes {
9595
/// Creates new [`Bytes`] around `data`.
96-
pub fn new(data: impl AsRef<[u8]> + Clone + Send + Sync + 'static) -> Self {
96+
pub fn new(data: impl AsRef<[u8]> + Send + Sync + 'static) -> Self {
9797
Self(Arc::new(data))
9898
}
9999
}

native/src/user_interface.rs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -440,12 +440,13 @@ where
440440
overlay.layout(renderer, self.bounds, Vector::ZERO)
441441
});
442442

443-
let new_cursor_position =
444-
if overlay_layout.bounds().contains(cursor_position) {
445-
Point::new(-1.0, -1.0)
446-
} else {
447-
cursor_position
448-
};
443+
let new_cursor_position = if overlay
444+
.is_over(Layout::new(&overlay_layout), cursor_position)
445+
{
446+
Point::new(-1.0, -1.0)
447+
} else {
448+
cursor_position
449+
};
449450

450451
self.overlay = Some(overlay_layout);
451452

0 commit comments

Comments
 (0)