Wayland compositor (wlroots)
git clone https://git.lucas.co/cce-compositor.git
fix(snap): feed gap_width and cell fade inset into snap params
Windows now abut the visible cell edges when snapping instead of
floating halfway into the grid's gap/fade band.
Co-Authored-By: Claude Fable 5 <[email protected]>
src/server/seat.rs | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/server/seat.rs b/src/server/seat.rs
index 84e1d11..4924f64 100644
--- a/src/server/seat.rs
+++ b/src/server/seat.rs
@@ -948,7 +948,9 @@ impl Seat {
unsafe fn snap_params(&self) -> crate::policy::snap::SnapParams {
let layout = &(*self.server).wm.layout;
crate::policy::snap::SnapParams {
- grid_scale: layout.desktop_grid_scale,
+ cell_size: layout.desktop_grid_scale,
+ gap_width: layout.desktop_gap_width as f64,
+ cell_inset: layout.desktop_cell_fade_inset as f64,
threshold: if layout.desktop_snap { layout.desktop_snap_threshold } else { 0.0 },
border_width: layout.border_width as f64,
}