forge
Explore
Log in

Don't you dare go Hollow

Use active_window instead of top window

Browse files at this commit

11756dbfeff4ad4f999458e9be633b3a78167f1cNSPC911Parent: 92a25a0
  • fix
    • use active_window instead of top window
Show full message
fix: use active_window instead of top window
src/layout/floating.rsmodified+4 -1
@@ -360,7 +360,10 @@ impl<W: LayoutElement> FloatingSpace<W> {
360 ///360 ///
361 /// During animations, assumes the final tile position.361 /// During animations, assumes the final tile position.
362 pub fn active_window_visual_rectangle(&self) -> Option<Rectangle<f64, Logical>> {362 pub fn active_window_visual_rectangle(&self) -> Option<Rectangle<f64, Logical>> {
363- let (tile, offset) = self.tiles_with_offsets().next()?;363+ let active_id = self.active_window_id.as_ref()?;
364+ let (tile, offset) = self
365+ .tiles_with_offsets()
366+ .find(|(tile, _)| tile.window().id() == active_id)?;
364 367
365 let window_pos = offset + tile.window_loc();368 let window_pos = offset + tile.window_loc();
366 let window_size = tile.window_size();369 let window_size = tile.window_size();