parent
56035e1f13
commit
20687fef1c
2 changed files with 7 additions and 6 deletions
|
|
@ -11,6 +11,7 @@ Unreleased` header.
|
||||||
|
|
||||||
# Unreleased
|
# Unreleased
|
||||||
|
|
||||||
|
- Fix compatibility with 32-bit platforms without 64-bit atomics.
|
||||||
- On X11, fix swapped instance and general class names.
|
- On X11, fix swapped instance and general class names.
|
||||||
- **Breaking:** Removed unnecessary generic parameter `T` from `EventLoopWindowTarget`.
|
- **Breaking:** Removed unnecessary generic parameter `T` from `EventLoopWindowTarget`.
|
||||||
- On Windows, macOS, X11, Wayland and Web, implement setting images as cursors. See the `custom_cursors.rs` example.
|
- On Windows, macOS, X11, Wayland and Web, implement setting images as cursors. See the `custom_cursors.rs` example.
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ use std::marker::PhantomData;
|
||||||
use std::ops::Deref;
|
use std::ops::Deref;
|
||||||
#[cfg(any(x11_platform, wayland_platform))]
|
#[cfg(any(x11_platform, wayland_platform))]
|
||||||
use std::os::unix::io::{AsFd, AsRawFd, BorrowedFd, RawFd};
|
use std::os::unix::io::{AsFd, AsRawFd, BorrowedFd, RawFd};
|
||||||
use std::sync::atomic::{AtomicBool, AtomicU64, Ordering};
|
use std::sync::atomic::{AtomicBool, AtomicUsize, Ordering};
|
||||||
use std::{error, fmt};
|
use std::{error, fmt};
|
||||||
|
|
||||||
#[cfg(not(web_platform))]
|
#[cfg(not(web_platform))]
|
||||||
|
|
@ -518,16 +518,16 @@ pub enum DeviceEvents {
|
||||||
/// executed and removed from the list.
|
/// executed and removed from the list.
|
||||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||||
pub struct AsyncRequestSerial {
|
pub struct AsyncRequestSerial {
|
||||||
serial: u64,
|
serial: usize,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl AsyncRequestSerial {
|
impl AsyncRequestSerial {
|
||||||
// TODO(kchibisov) remove `cfg` when the clipboard will be added.
|
// TODO(kchibisov): Remove `cfg` when the clipboard will be added.
|
||||||
#[allow(dead_code)]
|
#[allow(dead_code)]
|
||||||
pub(crate) fn get() -> Self {
|
pub(crate) fn get() -> Self {
|
||||||
static CURRENT_SERIAL: AtomicU64 = AtomicU64::new(0);
|
static CURRENT_SERIAL: AtomicUsize = AtomicUsize::new(0);
|
||||||
// NOTE: we rely on wrap around here, while the user may just request
|
// NOTE: We rely on wrap around here, while the user may just request
|
||||||
// in the loop u64::MAX times that's issue is considered on them.
|
// in the loop usize::MAX times that's issue is considered on them.
|
||||||
let serial = CURRENT_SERIAL.fetch_add(1, Ordering::Relaxed);
|
let serial = CURRENT_SERIAL.fetch_add(1, Ordering::Relaxed);
|
||||||
Self { serial }
|
Self { serial }
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue