From 3edb8fd906b69312513ed9c2603bc329685ba3b6 Mon Sep 17 00:00:00 2001 From: Ivan Molodetskikh Date: Mon, 9 Jun 2025 13:44:34 +0300 Subject: layout/scrolling: Take parent area into account for popup unconstraining --- src/layout/scrolling.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/layout') 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 ScrollingSpace { 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; -- cgit