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,15 +673,22 @@ 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 {
|
||||||
frame.resize(w, h);
|
// Drop resize events equaled to the current size
|
||||||
frame.refresh();
|
if newsize != *size {
|
||||||
let logical_size = crate::dpi::LogicalSize::new(w as f64, h as f64);
|
let (w, h) = newsize;
|
||||||
sink.send_window_event(
|
frame.resize(w, h);
|
||||||
crate::event::WindowEvent::Resized(logical_size),
|
frame.refresh();
|
||||||
wid,
|
let logical_size = crate::dpi::LogicalSize::new(w as f64, h as f64);
|
||||||
);
|
sink.send_window_event(
|
||||||
*size = (w, h);
|
crate::event::WindowEvent::Resized(logical_size),
|
||||||
|
wid,
|
||||||
|
);
|
||||||
|
*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