aboutsummaryrefslogtreecommitdiff
path: root/src/layout
diff options
context:
space:
mode:
authorIvan Molodetskikh <yalterz@gmail.com>2025-02-07 09:36:08 +0300
committerIvan Molodetskikh <yalterz@gmail.com>2025-02-07 10:03:38 +0300
commit0c59fc304c86e20b07e44c09d49a6798300e3957 (patch)
tree3116c52e8a63bcdb1cbfb3f98fba55ef8b1e8023 /src/layout
parentabd7f1dce3b4134801560259e3476260f9425b91 (diff)
downloadniri-0c59fc304c86e20b07e44c09d49a6798300e3957.tar.gz
niri-0c59fc304c86e20b07e44c09d49a6798300e3957.tar.bz2
niri-0c59fc304c86e20b07e44c09d49a6798300e3957.zip
layout/scrolling: Use early return in tiles_origin()
Diffstat (limited to 'src/layout')
-rw-r--r--src/layout/scrolling.rs10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/layout/scrolling.rs b/src/layout/scrolling.rs
index 2b925cd9..349a0e02 100644
--- a/src/layout/scrolling.rs
+++ b/src/layout/scrolling.rs
@@ -3973,11 +3973,15 @@ impl<W: LayoutElement> Column<W> {
}
fn tiles_origin(&self) -> Point<f64, Logical> {
+ let mut origin = Point::from((0., 0.));
+
if self.is_fullscreen {
- Point::from((0., 0.))
- } else {
- Point::from((0., self.working_area.loc.y + self.options.gaps))
+ return origin;
}
+
+ origin.y += self.working_area.loc.y + self.options.gaps;
+
+ origin
}
// HACK: pass a self.data iterator in manually as a workaround for the lack of method partial