From 8ac85c411294f6e667270d7e5aa35360bc6ec0b0 Mon Sep 17 00:00:00 2001 From: Victoria Brekenfeld Date: Tue, 3 May 2022 14:00:31 +0200 Subject: [PATCH] input: implicit keyboard focus for toplevels only --- src/input/mod.rs | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/input/mod.rs b/src/input/mod.rs index eafa28c8..8c33c910 100644 --- a/src/input/mod.rs +++ b/src/input/mod.rs @@ -551,7 +551,7 @@ impl State { .surface_under( pos - output_geo.loc.to_f64() - layer_loc.to_f64(), - WindowSurfaceType::ALL, + WindowSurfaceType::TOPLEVEL, ) .map(|(s, _)| s); } @@ -559,8 +559,7 @@ impl State { under = window .surface_under( pos - output_geo.loc.to_f64(), - WindowSurfaceType::TOPLEVEL - | WindowSurfaceType::SUBSURFACE, + WindowSurfaceType::TOPLEVEL, ) .map(|(s, _)| s); } @@ -578,15 +577,14 @@ impl State { .surface_under( pos - output_geo.loc.to_f64() - layer_loc.to_f64(), - WindowSurfaceType::ALL, + WindowSurfaceType::TOPLEVEL, ) .map(|(s, _)| s); } } else if let Some((_, surface, _)) = workspace.space.surface_under( relative_pos, - WindowSurfaceType::TOPLEVEL - | WindowSurfaceType::SUBSURFACE, + WindowSurfaceType::TOPLEVEL, ) { under = Some(surface); @@ -602,7 +600,7 @@ impl State { .surface_under( pos - output_geo.loc.to_f64() - layer_loc.to_f64(), - WindowSurfaceType::ALL, + WindowSurfaceType::TOPLEVEL, ) .map(|(s, _)| s); }