Sine Striker
2023-12-27 8a0b7831e988a347603e6abb4e8294010ab9b0e0
src/widgets/widgetwindowagent_mac.cpp
@@ -19,7 +19,8 @@
            switch (event->type()) {
                case QEvent::Move:
                case QEvent::Resize: {
                    ctx->setSystemButtonArea(widget->geometry());
                    QRect rect(widget->mapTo(widget->window(), {}), widget->size());
                    ctx->setSystemButtonArea(rect);
                    break;
                }
@@ -34,11 +35,18 @@
        AbstractWindowContext *ctx;
    };
    /*!
        Returns the widget that acts as the system button area.
    */
    QWidget *WidgetWindowAgent::systemButtonArea() const {
        Q_D(const WidgetWindowAgent);
        return d->systemButtonAreaWidget;
    }
    /*!
        Sets the widget that acts as the system button area. The system button will be centered in
        its area, it is recommended to place the widget in a layout and set a fixed size policy.
    */
    void WidgetWindowAgent::setSystemButtonArea(QWidget *widget) {
        Q_D(WidgetWindowAgent);
        auto ctx = d->context.get();