On Wayland, fix deadlock when calling set_inner_size from event loop

Fixes #1571.
This commit is contained in:
Kirill Chibisov
2020-05-22 13:33:04 +03:00
committed by GitHub
parent 6cfddfea21
commit ff66bdda7c
3 changed files with 11 additions and 8 deletions

View File

@@ -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),