From ea1800f157db1039b04efd1fb720504abaa6ebac Mon Sep 17 00:00:00 2001 From: Victoria Brekenfeld Date: Wed, 12 Mar 2025 15:29:17 +0100 Subject: [PATCH] input: Fix events for subsurfaces of lock surface --- src/input/mod.rs | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/src/input/mod.rs b/src/input/mod.rs index 9f3dca2b..6ca44fd4 100644 --- a/src/input/mod.rs +++ b/src/input/mod.rs @@ -2092,14 +2092,24 @@ impl State { } } Stage::SessionLock(lock_surface) => { - return ControlFlow::Break(Ok(lock_surface.map(|surface| { - ( - PointerFocusTarget::WlSurface { - surface: surface.wl_surface().clone(), - toplevel: None, - }, - output_geo.loc.to_f64(), - ) + return ControlFlow::Break(Ok(lock_surface.and_then(|surface| { + let location = output_geo.loc; + if let Some((surface, surface_loc)) = under_from_surface_tree( + surface.wl_surface(), + global_pos.as_logical(), + location.as_logical(), + WindowSurfaceType::ALL, + ) { + Some(( + PointerFocusTarget::WlSurface { + surface, + toplevel: None, + }, + surface_loc.as_global().to_f64(), + )) + } else { + None + } }))); } Stage::LayerPopup {