mirror of
https://github.com/niri-wm/niri.git
synced 2026-06-23 02:05:33 +07:00
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.
This commit is contained in:
+1
-13
@@ -902,19 +902,7 @@ impl<W: LayoutElement> Monitor<W> {
|
|||||||
///
|
///
|
||||||
/// During animations, assumes the final view position.
|
/// During animations, assumes the final view position.
|
||||||
pub fn active_tile_visual_rectangle(&self) -> Option<Rectangle<f64, Logical>> {
|
pub fn active_tile_visual_rectangle(&self) -> Option<Rectangle<f64, Logical>> {
|
||||||
let mut rect = self.active_workspace_ref().active_tile_visual_rectangle()?;
|
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)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn workspace_render_idx(&self) -> f64 {
|
pub fn workspace_render_idx(&self) -> f64 {
|
||||||
|
|||||||
Reference in New Issue
Block a user