diff --git a/src/input.rs b/src/input.rs index 35e181c..5f7a3d5 100644 --- a/src/input.rs +++ b/src/input.rs @@ -218,9 +218,9 @@ impl Pinnacle { let layer_under = |layers: &[wlr_layer::Layer]| -> Option<(PointerFocusTarget, Point)> { let layer_map = layer_map_for_output(output); - let layer = layers - .iter() - .find_map(|layer| layer_map.layer_under(*layer, point))?; + let layer = layers.iter().find_map(|layer| { + layer_map.layer_under(*layer, point - output_geo.loc.to_f64()) + })?; let layer_loc = layer_map.layer_geometry(layer)?.loc;