mirror of
https://github.com/rust-windowing/winit.git
synced 2026-06-28 07:33:14 -04:00
On Wayland, fix deadlock when calling set_inner_size from event loop
Fixes #1571.
This commit is contained in:
@@ -667,6 +667,8 @@ impl<T> EventLoop<T> {
|
||||
window_target.store.lock().unwrap().for_each_redraw_trigger(
|
||||
|refresh, frame_refresh, wid, frame| {
|
||||
if let Some(frame) = frame {
|
||||
let mut frame = frame.lock().unwrap();
|
||||
|
||||
if frame_refresh {
|
||||
frame.refresh();
|
||||
if !refresh {
|
||||
@@ -751,6 +753,7 @@ impl<T> EventLoop<T> {
|
||||
|
||||
if window.new_size.is_some() || window.new_scale_factor.is_some() {
|
||||
if let Some(frame) = window.frame {
|
||||
let mut frame = frame.lock().unwrap();
|
||||
// Update decorations state
|
||||
match window.decorations_action {
|
||||
Some(DecorationsAction::Hide) => frame.set_decorate(false),
|
||||
|
||||
Reference in New Issue
Block a user