Sine Striker
2023-12-26 c8a5a82994e513acb00ba0e1f0b882ccbb18a6db
src/core/contexts/win32windowcontext.cpp
@@ -9,7 +9,6 @@
#include <QtGui/QGuiApplication>
#include <QtGui/QPainter>
#include <QtGui/QPalette>
#include <QtGui/QStyleHints>
#include <QtGui/private/qhighdpiscaling_p.h>
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
@@ -723,8 +722,8 @@
        auto hWnd = reinterpret_cast<HWND>(winId);
        if (!isSystemBorderEnabled()) {
            setWindowAttribute(QStringLiteral("extra-margins"),
                               QVariant::fromValue(QMargins(1, 1, 1, 1)));
            static auto margins = QVariant::fromValue(QMargins(1, 1, 1, 1));
            setWindowAttribute(QStringLiteral("extra-margins"), margins);
        }
        {
@@ -1319,12 +1318,12 @@
                                                 LPARAM lParam, LRESULT *result) {
        switch (message) {
            case WM_SHOWWINDOW: {
                if (!centered) {
                if (!initialCentered) {
                    // If wParam is TRUE, the window is being shown.
                    // If lParam is zero, the message was sent because of a call to the ShowWindow
                    // function.
                    if (wParam && !lParam) {
                        centered = true;
                        initialCentered = true;
                        moveWindowToDesktopCenter(hWnd);
                    }
                }