aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIvan Molodetskikh <yalterz@gmail.com>2025-04-12 09:44:49 +0300
committerIvan Molodetskikh <yalterz@gmail.com>2025-04-25 02:00:18 -0700
commit9e5e0c85bb3c50d00108a4a2de0fe45bfc4ebb8d (patch)
treed21161e15faee78c565e35a232d20b7e5c9b7d2f /src
parent5cd8040d1ae46b1c1631fc6b61cde5cbf86883dd (diff)
downloadniri-9e5e0c85bb3c50d00108a4a2de0fe45bfc4ebb8d.tar.gz
niri-9e5e0c85bb3c50d00108a4a2de0fe45bfc4ebb8d.tar.bz2
niri-9e5e0c85bb3c50d00108a4a2de0fe45bfc4ebb8d.zip
Simplify condition
Diffstat (limited to 'src')
-rw-r--r--src/niri.rs13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/niri.rs b/src/niri.rs
index 4ceb16a8..f893bb33 100644
--- a/src/niri.rs
+++ b/src/niri.rs
@@ -2872,11 +2872,14 @@ impl Niri {
}
let mon = self.layout.monitor_for_output(output).unwrap();
- if !mon.render_above_top_layer()
- && (layer_popup_under(Layer::Top)
- || layer_toplevel_under(Layer::Top)
- || layer_popup_under(Layer::Bottom)
- || layer_popup_under(Layer::Background))
+ if mon.render_above_top_layer() {
+ return false;
+ }
+
+ if layer_popup_under(Layer::Top)
+ || layer_toplevel_under(Layer::Top)
+ || layer_popup_under(Layer::Bottom)
+ || layer_popup_under(Layer::Background)
{
return true;
}