From 53ca5af48ff5cf17ca0fa0012f1860e582fa9402 Mon Sep 17 00:00:00 2001 From: Kirill Chibisov Date: Wed, 25 Oct 2023 20:59:39 +0400 Subject: [PATCH] On Wayland, fix `RedrawRequsted` loop The `dirty` is never cleared when decorations are hidden without `sctk-adwaita`. Fixes #3177. --- CHANGELOG.md | 1 + src/platform_impl/linux/wayland/window/state.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1a68d111..85f30ae5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ Unreleased` header. # Unreleased +- On Wayland, fix `RedrawRequsted` being always sent without decorations and `sctk-adwaita` feature. - On Windows, fix deadlock when accessing the state during `Cursor{Enter,Leave}`. - On macOS, fix deadlock when entering a nested event loop from an event handler. diff --git a/src/platform_impl/linux/wayland/window/state.rs b/src/platform_impl/linux/wayland/window/state.rs index 67b705ab..ea2ff5ae 100644 --- a/src/platform_impl/linux/wayland/window/state.rs +++ b/src/platform_impl/linux/wayland/window/state.rs @@ -537,7 +537,7 @@ impl WindowState { /// Refresh the decorations frame if it's present returning whether the client should redraw. pub fn refresh_frame(&mut self) -> bool { if let Some(frame) = self.frame.as_mut() { - if frame.is_dirty() { + if !frame.is_hidden() && frame.is_dirty() { return frame.draw(); } }