diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2025-04-24 18:43:52 +0300 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2025-04-25 02:00:18 -0700 |
| commit | 7671a5d833a5de612247404b69a4583ef703ff42 (patch) | |
| tree | e95f0c6e176ca57f08ed019ba3bb9f2a0cb328a9 /src/layout | |
| parent | 3f09352067434c8ff84ef3f359e784cd63138c21 (diff) | |
| download | niri-7671a5d833a5de612247404b69a4583ef703ff42.tar.gz niri-7671a5d833a5de612247404b69a4583ef703ff42.tar.bz2 niri-7671a5d833a5de612247404b69a4583ef703ff42.zip | |
layout/monitor: Don't consider workspace switch in active_tile_visual_rectangle()
This only did something when in the middle of a touchpad gesture, and it
didn't really make sense for that edge case.
Diffstat (limited to 'src/layout')
| -rw-r--r-- | src/layout/monitor.rs | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/src/layout/monitor.rs b/src/layout/monitor.rs index ee16dc01..07e266be 100644 --- a/src/layout/monitor.rs +++ b/src/layout/monitor.rs @@ -902,19 +902,7 @@ impl<W: LayoutElement> Monitor<W> { /// /// During animations, assumes the final view position. pub fn active_tile_visual_rectangle(&self) -> Option<Rectangle<f64, Logical>> { - let mut rect = self.active_workspace_ref().active_tile_visual_rectangle()?; - - if let Some(switch) = &self.workspace_switch { - let size = output_size(&self.output).to_f64(); - - let offset = switch.target_idx() - self.active_workspace_idx as f64; - let offset = offset * size.h; - - let clip_rect = Rectangle::new(Point::from((0., -offset)), size); - rect = rect.intersection(clip_rect)?; - } - - Some(rect) + self.active_workspace_ref().active_tile_visual_rectangle() } pub fn workspace_render_idx(&self) -> f64 { |
