mirror of
https://github.com/rust-windowing/winit.git
synced 2026-08-29 04:40:04 -04:00
committed by
Kirill Chibisov
parent
3eb731f8b5
commit
69b8a07ae0
@@ -44,3 +44,4 @@ changelog entry.
|
|||||||
|
|
||||||
- On macOS, fixed crash when dragging non-file content onto window.
|
- On macOS, fixed crash when dragging non-file content onto window.
|
||||||
- On X11, fix `set_hittest` not working on some window managers.
|
- On X11, fix `set_hittest` not working on some window managers.
|
||||||
|
- On X11, fix debug mode overflow panic in `set_timestamp`.
|
||||||
|
|||||||
@@ -234,9 +234,7 @@ impl XConnection {
|
|||||||
// Store the timestamp in the slot if it's greater than the last one.
|
// Store the timestamp in the slot if it's greater than the last one.
|
||||||
let mut last_timestamp = self.timestamp.load(Ordering::Relaxed);
|
let mut last_timestamp = self.timestamp.load(Ordering::Relaxed);
|
||||||
loop {
|
loop {
|
||||||
let wrapping_sub = |a: xproto::Timestamp, b: xproto::Timestamp| (a as i32) - (b as i32);
|
if (timestamp as i32).wrapping_sub(last_timestamp as i32) <= 0 {
|
||||||
|
|
||||||
if wrapping_sub(timestamp, last_timestamp) <= 0 {
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user