From 7c175051b709407172ee5785d0e55eaaac564a52 Mon Sep 17 00:00:00 2001 From: DreamMaoMao <2523610504@qq.com> Date: Thu, 3 Jul 2025 10:30:20 +0800 Subject: [PATCH] fix: Incorrect layer margin init --- src/maomao.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/maomao.c b/src/maomao.c index a93217f..75757a2 100644 --- a/src/maomao.c +++ b/src/maomao.c @@ -3234,7 +3234,7 @@ void get_layer_target_geometry(LayerSurface *l, struct wlr_box *target_box) { if (box.width == 0) { box.x += state->margin.left; box.width = bounds.width - (state->margin.left + state->margin.right); - } else if (!(state->anchor & both_horiz)) { + } else { if (state->anchor & ZWLR_LAYER_SURFACE_V1_ANCHOR_LEFT) { box.x += state->margin.left; } else if (state->anchor & ZWLR_LAYER_SURFACE_V1_ANCHOR_RIGHT) { @@ -3245,7 +3245,7 @@ void get_layer_target_geometry(LayerSurface *l, struct wlr_box *target_box) { if (box.height == 0) { box.y += state->margin.top; box.height = bounds.height - (state->margin.top + state->margin.bottom); - } else if (!(state->anchor & both_vert)) { + } else { if (state->anchor & ZWLR_LAYER_SURFACE_V1_ANCHOR_TOP) { box.y += state->margin.top; } else if (state->anchor & ZWLR_LAYER_SURFACE_V1_ANCHOR_BOTTOM) {