atagen

monolith

public
Star0
Watch0

Commit 305397f3245e

tarball

atagen <boss@atagen.co>2026-10-19 10:59 UTC

1 file changed+12-16
input: build Edges from X11 resize edges through the xdg table

from_xdg and from_x11 carried the same eight-way table.
Modified file: crates/monolith/src/input.rs+12 additions−16 deletions
@@ -449,22 +449,18 @@ impl Edges {
449449 }
450450
451451 pub fn from_x11(edge: ResizeEdge) -> Self {
452- let (left, right, top, bottom) = match edge {
453- ResizeEdge::Top => (false, false, true, false),
454- ResizeEdge::Bottom => (false, false, false, true),
455- ResizeEdge::Left => (true, false, false, false),
456- ResizeEdge::Right => (false, true, false, false),
457- ResizeEdge::TopLeft => (true, false, true, false),
458- ResizeEdge::TopRight => (false, true, true, false),
459- ResizeEdge::BottomLeft => (true, false, false, true),
460- ResizeEdge::BottomRight => (false, true, false, true),
461- };
462- Self {
463- left,
464- right,
465- top,
466- bottom,
467- }
452+ use xdg_toplevel::ResizeEdge as E;
453+ Self::from_xdg(match edge {
454+ ResizeEdge::Top => E::Top,
455+ ResizeEdge::Bottom => E::Bottom,
456+ ResizeEdge::Left => E::Left,
457+ ResizeEdge::Right => E::Right,
458+ ResizeEdge::TopLeft => E::TopLeft,
459+ ResizeEdge::TopRight => E::TopRight,
460+ ResizeEdge::BottomLeft => E::BottomLeft,
461+ ResizeEdge::BottomRight => E::BottomRight,
462+ })
463+ .unwrap_or_default()
468464 }
469465 }