mirror of
https://github.com/niri-wm/niri.git
synced 2026-06-21 02:01:55 +07:00
fix: check for layer surface under cursor when clicking
This commit is contained in:
committed by
Ivan Molodetskikh
parent
b014c267ae
commit
b1c40a9079
+13
-1
@@ -2420,7 +2420,19 @@ impl Niri {
|
||||
|
||||
// Check if some layer-shell surface is on top.
|
||||
let layers = layer_map_for_output(output);
|
||||
let layer_under = |layer| layers.layer_under(layer, pos_within_output).is_some();
|
||||
let layer_under = |layer| {
|
||||
layers
|
||||
.layer_under(layer, pos_within_output)
|
||||
.and_then(|layer| {
|
||||
let layer_pos_within_output =
|
||||
layers.layer_geometry(layer).unwrap().loc.to_f64();
|
||||
layer.surface_under(
|
||||
pos_within_output - layer_pos_within_output,
|
||||
WindowSurfaceType::ALL,
|
||||
)
|
||||
})
|
||||
.is_some()
|
||||
};
|
||||
if layer_under(Layer::Overlay) {
|
||||
return None;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user