// SPDX-FileCopyrightText: 2022 The wlroots contributors
// SPDX-FileCopyrightText: 2025 KylinSoft Co., Ltd.
//
// SPDX-License-Identifier: GPL-1.0-or-later

#include <stddef.h>

#include <kywc/boxes.h>

bool kywc_fbox_equal(const struct kywc_fbox *a, const struct kywc_fbox *b)
{
    if (kywc_fbox_empty(a)) {
        a = NULL;
    }
    if (kywc_fbox_empty(b)) {
        b = NULL;
    }

    if (a == NULL || b == NULL) {
        return a == b;
    }

    return a->x == b->x && a->y == b->y && a->width == b->width && a->height == b->height;
}
