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 {
281 // IME popups aren't affected by rules for regular popups.281 // IME popups aren't affected by rules for regular popups.
282 PopupKind::InputMethod(_) => niri_config::ResolvedPopupsRules::default(),282 PopupKind::InputMethod(_) => niri_config::ResolvedPopupsRules::default(),
283 };283 };
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+ };
285 289
286 let surface = popup.wl_surface();290 let surface = popup.wl_surface();
287 let popup_geo = popup.geometry();291 let popup_geo = popup.geometry();
src/window/mapped.rsmodified+5 -1
@@ -693,7 +693,11 @@ impl LayoutElement for Mapped {
693 // IME popups aren't affected by rules for regular popups.693 // IME popups aren't affected by rules for regular popups.
694 PopupKind::InputMethod(_) => niri_config::ResolvedPopupsRules::default(),694 PopupKind::InputMethod(_) => niri_config::ResolvedPopupsRules::default(),
695 };695 };
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+ };
697 701
698 let surface = popup.wl_surface();702 let surface = popup.wl_surface();
699 let popup_geo = popup.geometry();703 let popup_geo = popup.geometry();