mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2024-12-24 06:11:30 +11:00
on Wayland, drop resize events equal to the current window size (#1249)
* on Wayland, drop resize events equal to the current window size * Add changelog entry
This commit is contained in:
parent
f916311744
commit
72fc6a74ec
|
@ -43,6 +43,7 @@
|
||||||
- This is because some platforms cannot run the event loop outside the main thread. Preventing this
|
- This is because some platforms cannot run the event loop outside the main thread. Preventing this
|
||||||
reduces the potential for cross-platform compatibility gotchyas.
|
reduces the potential for cross-platform compatibility gotchyas.
|
||||||
- On Windows and Linux X11/Wayland, add platform-specific functions for creating an `EventLoop` outside the main thread.
|
- On Windows and Linux X11/Wayland, add platform-specific functions for creating an `EventLoop` outside the main thread.
|
||||||
|
- On Wayland, drop resize events identical to the current window size.
|
||||||
|
|
||||||
# 0.20.0 Alpha 3 (2019-08-14)
|
# 0.20.0 Alpha 3 (2019-08-14)
|
||||||
|
|
||||||
|
|
|
@ -673,7 +673,10 @@ impl<T> EventLoop<T> {
|
||||||
wid,
|
wid,
|
||||||
frame| {
|
frame| {
|
||||||
if let Some(frame) = frame {
|
if let Some(frame) = frame {
|
||||||
if let Some((w, h)) = newsize {
|
if let Some(newsize) = newsize {
|
||||||
|
// Drop resize events equaled to the current size
|
||||||
|
if newsize != *size {
|
||||||
|
let (w, h) = newsize;
|
||||||
frame.resize(w, h);
|
frame.resize(w, h);
|
||||||
frame.refresh();
|
frame.refresh();
|
||||||
let logical_size = crate::dpi::LogicalSize::new(w as f64, h as f64);
|
let logical_size = crate::dpi::LogicalSize::new(w as f64, h as f64);
|
||||||
|
@ -682,6 +685,10 @@ impl<T> EventLoop<T> {
|
||||||
wid,
|
wid,
|
||||||
);
|
);
|
||||||
*size = (w, h);
|
*size = (w, h);
|
||||||
|
} else {
|
||||||
|
// Refresh csd, etc, otherwise
|
||||||
|
frame.refresh();
|
||||||
|
}
|
||||||
} else if frame_refresh {
|
} else if frame_refresh {
|
||||||
frame.refresh();
|
frame.refresh();
|
||||||
if !refresh {
|
if !refresh {
|
||||||
|
|
Loading…
Reference in a new issue