forge
Explore
Log in

Don't you dare go Hollow

Render IME popups at full opacity

Browse files at this commit

fff3b86bca2b729dbff5b74fcffef3b78d876ba8Ivan MolodetskikhParent: 58d213e
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.rsmodified+5 -1
@@ -281,7 +281,11 @@ impl MappedLayer {
281281 // IME popups aren't affected by rules for regular popups.
282282 PopupKind::InputMethod(_) => niri_config::ResolvedPopupsRules::default(),
283283 };
284- let alpha = alpha * popup_rules.opacity.unwrap_or(1.).clamp(0., 1.);
284+ let alpha = match popup {
285+ PopupKind::Xdg(_) => alpha * popup_rules.opacity.unwrap_or(1.).clamp(0., 1.),
286+ // IME popups aren't affected by the layer opacity.
287+ PopupKind::InputMethod(_) => 1.,
288+ };
285289
286290 let surface = popup.wl_surface();
287291 let popup_geo = popup.geometry();
src/window/mapped.rsmodified+5 -1
@@ -693,7 +693,11 @@ impl LayoutElement for Mapped {
693693 // IME popups aren't affected by rules for regular popups.
694694 PopupKind::InputMethod(_) => niri_config::ResolvedPopupsRules::default(),
695695 };
696- let alpha = alpha * popup_rules.opacity.unwrap_or(1.).clamp(0., 1.);
696+ let alpha = match popup {
697+ PopupKind::Xdg(_) => alpha * popup_rules.opacity.unwrap_or(1.).clamp(0., 1.),
698+ // IME popups aren't affected by the window opacity.
699+ PopupKind::InputMethod(_) => 1.,
700+ };
697701
698702 let surface = popup.wl_surface();
699703 let popup_geo = popup.geometry();