From fff3b86bca2b729dbff5b74fcffef3b78d876ba8 Mon Sep 17 00:00:00 2001 From: Ivan Molodetskikh Date: Mon, 19 Oct 2026 09:20:12 +0300 Subject: [PATCH] Render IME popups at full opacity They aren't really part of the window itself, so it makes sense for them to be unaffected by the window/layer rule opacity. --- src/layer/mapped.rs | 6 +++++- src/window/mapped.rs | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/layer/mapped.rs b/src/layer/mapped.rs index fbaa6fc6..3f7eb189 100644 --- a/src/layer/mapped.rs +++ b/src/layer/mapped.rs @@ -281,7 +281,11 @@ impl MappedLayer { // IME popups aren't affected by rules for regular popups. PopupKind::InputMethod(_) => niri_config::ResolvedPopupsRules::default(), }; - let alpha = alpha * popup_rules.opacity.unwrap_or(1.).clamp(0., 1.); + let alpha = match popup { + PopupKind::Xdg(_) => alpha * popup_rules.opacity.unwrap_or(1.).clamp(0., 1.), + // IME popups aren't affected by the layer opacity. + PopupKind::InputMethod(_) => 1., + }; let surface = popup.wl_surface(); let popup_geo = popup.geometry(); diff --git a/src/window/mapped.rs b/src/window/mapped.rs index 3db1f66c..785e4081 100644 --- a/src/window/mapped.rs +++ b/src/window/mapped.rs @@ -693,7 +693,11 @@ impl LayoutElement for Mapped { // IME popups aren't affected by rules for regular popups. PopupKind::InputMethod(_) => niri_config::ResolvedPopupsRules::default(), }; - let alpha = alpha * popup_rules.opacity.unwrap_or(1.).clamp(0., 1.); + let alpha = match popup { + PopupKind::Xdg(_) => alpha * popup_rules.opacity.unwrap_or(1.).clamp(0., 1.), + // IME popups aren't affected by the window opacity. + PopupKind::InputMethod(_) => 1., + }; let surface = popup.wl_surface(); let popup_geo = popup.geometry();