aboutsummaryrefslogtreecommitdiff
path: root/src/layout
diff options
context:
space:
mode:
authorIvan Molodetskikh <yalterz@gmail.com>2025-06-09 13:44:34 +0300
committerIvan Molodetskikh <yalterz@gmail.com>2025-06-09 13:52:18 +0300
commit3edb8fd906b69312513ed9c2603bc329685ba3b6 (patch)
tree7e3047df2382da08fa9612cc32cb4fd6a385d47a /src/layout
parentc9b1514d63e49b079914a0413eb3500b0d804b99 (diff)
downloadniri-3edb8fd906b69312513ed9c2603bc329685ba3b6.tar.gz
niri-3edb8fd906b69312513ed9c2603bc329685ba3b6.tar.bz2
niri-3edb8fd906b69312513ed9c2603bc329685ba3b6.zip
layout/scrolling: Take parent area into account for popup unconstraining
Diffstat (limited to 'src/layout')
-rw-r--r--src/layout/scrolling.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/layout/scrolling.rs b/src/layout/scrolling.rs
index 37e6a571..1b4d91c5 100644
--- a/src/layout/scrolling.rs
+++ b/src/layout/scrolling.rs
@@ -2450,11 +2450,13 @@ impl<W: LayoutElement> ScrollingSpace<W> {
if tile.window().id() == id {
// In the scrolling layout, we try to position popups horizontally within the
// window geometry (so they remain visible even if the window scrolls flush with
- // the left/right edge of the screen), and vertically wihin the whole view size.
+ // the left/right edge of the screen), and vertically wihin the whole parent
+ // working area.
let width = tile.window_size().w;
- let height = self.view_size.h;
+ let height = self.parent_area.size.h;
let mut target = Rectangle::from_size(Size::from((width, height)));
+ target.loc.y += self.parent_area.loc.y;
target.loc.y -= pos.y;
target.loc.y -= tile.window_loc().y;