forge
Explore
Log in

Don't you dare go Hollow

Fix clicks activating windows through layer-shell surfaces

Browse files at this commit

e46b614c2bf08dd7b09ca8a84321f2c066855aaaIvan MolodetskikhParent: 78aa08b
src/niri.rsmodified+13 -0
@@ -1055,6 +1055,19 @@ impl Niri {
10551055 }
10561056
10571057 let (output, pos_within_output) = self.output_under(pos)?;
1058+
1059+ // Check if some layer-shell surface is on top.
1060+ let layers = layer_map_for_output(output);
1061+ let layer_under = |layer| layers.layer_under(layer, pos_within_output).is_some();
1062+ if layer_under(Layer::Overlay) {
1063+ return None;
1064+ }
1065+
1066+ let mon = self.layout.monitor_for_output(output).unwrap();
1067+ if !mon.render_above_top_layer() && layer_under(Layer::Top) {
1068+ return None;
1069+ }
1070+
10581071 let (window, _loc) = self.layout.window_under(output, pos_within_output)?;
10591072 Some(window)
10601073 }