input: implicit keyboard focus for toplevels only

This commit is contained in:
Victoria Brekenfeld 2022-05-03 14:00:31 +02:00
parent 14b379da25
commit 8ac85c4112

View file

@ -551,7 +551,7 @@ impl State {
.surface_under( .surface_under(
pos - output_geo.loc.to_f64() pos - output_geo.loc.to_f64()
- layer_loc.to_f64(), - layer_loc.to_f64(),
WindowSurfaceType::ALL, WindowSurfaceType::TOPLEVEL,
) )
.map(|(s, _)| s); .map(|(s, _)| s);
} }
@ -559,8 +559,7 @@ impl State {
under = window under = window
.surface_under( .surface_under(
pos - output_geo.loc.to_f64(), pos - output_geo.loc.to_f64(),
WindowSurfaceType::TOPLEVEL WindowSurfaceType::TOPLEVEL,
| WindowSurfaceType::SUBSURFACE,
) )
.map(|(s, _)| s); .map(|(s, _)| s);
} }
@ -578,15 +577,14 @@ impl State {
.surface_under( .surface_under(
pos - output_geo.loc.to_f64() pos - output_geo.loc.to_f64()
- layer_loc.to_f64(), - layer_loc.to_f64(),
WindowSurfaceType::ALL, WindowSurfaceType::TOPLEVEL,
) )
.map(|(s, _)| s); .map(|(s, _)| s);
} }
} else if let Some((_, surface, _)) = } else if let Some((_, surface, _)) =
workspace.space.surface_under( workspace.space.surface_under(
relative_pos, relative_pos,
WindowSurfaceType::TOPLEVEL WindowSurfaceType::TOPLEVEL,
| WindowSurfaceType::SUBSURFACE,
) )
{ {
under = Some(surface); under = Some(surface);
@ -602,7 +600,7 @@ impl State {
.surface_under( .surface_under(
pos - output_geo.loc.to_f64() pos - output_geo.loc.to_f64()
- layer_loc.to_f64(), - layer_loc.to_f64(),
WindowSurfaceType::ALL, WindowSurfaceType::TOPLEVEL,
) )
.map(|(s, _)| s); .map(|(s, _)| s);
} }