From 3fafdeb1a8280c5313f235a45af41d30e1314cc7 Mon Sep 17 00:00:00 2001 From: jansol Date: Mon, 30 Sep 2024 10:09:13 +0300 Subject: [PATCH] gpui: Fix blur region on Plasma/Wayland (#18465) Once again aping after what winit does - since we always want to have the whole window blurred there is apparently no need to specify a blur region at all. Rounded corners would be the exception, but that is not possible with the current protocol (it is planned for the vendor-neutral version though!) This eliminates the problem where only a fixed region of the window would get blurred if the window was resized to be larger than at launch. Also a drive-by comment grammar fix :wink: Release Notes: - Fixed blur region handling on Plasma/Wayland --- crates/gpui/src/platform/linux/wayland/window.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/crates/gpui/src/platform/linux/wayland/window.rs b/crates/gpui/src/platform/linux/wayland/window.rs index a0520f6b7056e5c1f5b5d3359fab92ec3b933a24..329b6c185fbfe9cbdc30d0b19c62825e680713f3 100644 --- a/crates/gpui/src/platform/linux/wayland/window.rs +++ b/crates/gpui/src/platform/linux/wayland/window.rs @@ -1046,8 +1046,8 @@ fn update_window(mut state: RefMut) { && state.decorations == WindowDecorations::Server { // Promise the compositor that this region of the window surface - // contains no transparent pixels. This allows the compositor to - // do skip whatever is behind the surface for better performance. + // contains no transparent pixels. This allows the compositor to skip + // updating whatever is behind the surface for better performance. state.surface.set_opaque_region(Some(®ion)); } else { state.surface.set_opaque_region(None); @@ -1057,7 +1057,6 @@ fn update_window(mut state: RefMut) { if state.background_appearance == WindowBackgroundAppearance::Blurred { if state.blur.is_none() { let blur = blur_manager.create(&state.surface, &state.globals.qh, ()); - blur.set_region(Some(®ion)); state.blur = Some(blur); } state.blur.as_ref().unwrap().commit();