diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2025-01-03 16:41:27 +0300 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2025-01-03 16:41:39 +0300 |
| commit | 152ed59502bb0e7279d896f2ab4eaabfbcc536da (patch) | |
| tree | fd008dd0c2248ec4517163b2f4e55444f9966431 /src | |
| parent | 8e16be9e1150fed822fd671b3faf082a9b2641c0 (diff) | |
| download | niri-152ed59502bb0e7279d896f2ab4eaabfbcc536da.tar.gz niri-152ed59502bb0e7279d896f2ab4eaabfbcc536da.tar.bz2 niri-152ed59502bb0e7279d896f2ab4eaabfbcc536da.zip | |
Allow keyboard focus for bottom and background layers
Diffstat (limited to 'src')
| -rw-r--r-- | src/niri.rs | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/niri.rs b/src/niri.rs index c8180c73..69b60dbe 100644 --- a/src/niri.rs +++ b/src/niri.rs @@ -928,14 +928,19 @@ impl State { if mon.render_above_top_layer() { surface = surface.or_else(layout_focus); surface = surface.or_else(|| focus_on_layer(Layer::Top)); + surface = surface.or_else(|| focus_on_layer(Layer::Bottom)); + surface = surface.or_else(|| focus_on_layer(Layer::Background)); } else { surface = surface.or_else(|| focus_on_layer(Layer::Top)); + surface = surface.or_else(|| on_d_focus_on_layer(Layer::Bottom)); + surface = surface.or_else(|| on_d_focus_on_layer(Layer::Background)); surface = surface.or_else(layout_focus); - } - // Bottom and background layers can receive on-demand focus only. - surface = surface.or_else(|| on_d_focus_on_layer(Layer::Bottom)); - surface = surface.or_else(|| on_d_focus_on_layer(Layer::Background)); + // Bottom and background layers can only receive exclusive focus when there are no + // layout windows. + surface = surface.or_else(|| excl_focus_on_layer(Layer::Bottom)); + surface = surface.or_else(|| excl_focus_on_layer(Layer::Background)); + } surface.unwrap_or(KeyboardFocus::Layout { surface: None }) } else { |
