forge
Explore
Log in

Don't you dare go Hollow

layout/monitor: Don't consider workspace switch in active_tile_visual_rectangle()

Browse files at this commit

7671a5d833a5de612247404b69a4583ef703ff42Ivan MolodetskikhParent: 3f09352
This only did something when in the middle of a touchpad gesture, and it
didn't really make sense for that edge case.
src/layout/monitor.rsmodified+1 -13
@@ -902,19 +902,7 @@ impl<W: LayoutElement> Monitor<W> {
902 ///902 ///
903 /// During animations, assumes the final view position.903 /// During animations, assumes the final view position.
904 pub fn active_tile_visual_rectangle(&self) -> Option<Rectangle<f64, Logical>> {904 pub fn active_tile_visual_rectangle(&self) -> Option<Rectangle<f64, Logical>> {
905- let mut rect = self.active_workspace_ref().active_tile_visual_rectangle()?;905+ self.active_workspace_ref().active_tile_visual_rectangle()
906-
907- if let Some(switch) = &self.workspace_switch {
908- let size = output_size(&self.output).to_f64();
909-
910- let offset = switch.target_idx() - self.active_workspace_idx as f64;
911- let offset = offset * size.h;
912-
913- let clip_rect = Rectangle::new(Point::from((0., -offset)), size);
914- rect = rect.intersection(clip_rect)?;
915- }
916-
917- Some(rect)
918 }906 }
919 907
920 pub fn workspace_render_idx(&self) -> f64 {908 pub fn workspace_render_idx(&self) -> f64 {