mirror of
https://github.com/niri-wm/niri.git
synced 2026-06-23 02:05:33 +07:00
Implement baba-is-float for layers
This commit is contained in:
+2
-4
@@ -25,8 +25,8 @@ use crate::render_helpers::shadow::ShadowRenderElement;
|
||||
use crate::render_helpers::snapshot::RenderSnapshot;
|
||||
use crate::render_helpers::solid_color::{SolidColorBuffer, SolidColorRenderElement};
|
||||
use crate::render_helpers::RenderTarget;
|
||||
use crate::utils::round_logical_in_physical;
|
||||
use crate::utils::transaction::Transaction;
|
||||
use crate::utils::{baba_is_float_offset, round_logical_in_physical};
|
||||
|
||||
/// Toplevel window with decorations.
|
||||
#[derive(Debug)]
|
||||
@@ -800,9 +800,7 @@ impl<W: LayoutElement> Tile<W> {
|
||||
return Point::from((0., 0.));
|
||||
}
|
||||
|
||||
let now = self.clock.now().as_secs_f64();
|
||||
let amplitude = self.view_size.h / 96.;
|
||||
let y = amplitude * ((f64::consts::TAU * now / 3.6).sin() - 1.);
|
||||
let y = baba_is_float_offset(self.clock.now(), self.view_size.h);
|
||||
let y = round_logical_in_physical(self.scale, y);
|
||||
Point::from((0., y))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user