mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2024-12-23 22:01:31 +11:00
Fix unable to ignore scale factor resize suggestion
This commit is contained in:
parent
e220a75556
commit
9797ed86f0
|
@ -78,6 +78,7 @@ And please only add new entries to the top of this list, right below the `# Unre
|
||||||
instead of using the output bitmap size.
|
instead of using the output bitmap size.
|
||||||
- On Web, scale factor and dark mode detection are now more robust.
|
- On Web, scale factor and dark mode detection are now more robust.
|
||||||
- On Web, fix the bfcache by not using the `beforeunload` event.
|
- On Web, fix the bfcache by not using the `beforeunload` event.
|
||||||
|
- On Web, fix scale factor resize suggestion always overwriting the canvas size.
|
||||||
|
|
||||||
# 0.28.6
|
# 0.28.6
|
||||||
|
|
||||||
|
|
|
@ -349,6 +349,7 @@ impl<T: 'static> Shared<T> {
|
||||||
);
|
);
|
||||||
|
|
||||||
// Then we resize the canvas to the new size and send a `Resized` event:
|
// Then we resize the canvas to the new size and send a `Resized` event:
|
||||||
|
if current_size != new_size {
|
||||||
backend::set_canvas_size(&canvas, crate::dpi::Size::Physical(new_size));
|
backend::set_canvas_size(&canvas, crate::dpi::Size::Physical(new_size));
|
||||||
self.handle_single_event_sync(
|
self.handle_single_event_sync(
|
||||||
Event::WindowEvent {
|
Event::WindowEvent {
|
||||||
|
@ -358,6 +359,7 @@ impl<T: 'static> Shared<T> {
|
||||||
&mut control,
|
&mut control,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Process the destroy-pending windows again.
|
// Process the destroy-pending windows again.
|
||||||
self.process_destroy_pending_windows(&mut control);
|
self.process_destroy_pending_windows(&mut control);
|
||||||
|
|
Loading…
Reference in a new issue