Sine Striker
2023-12-26 1740ed5e0e765ebd8676733243eb3eaa81f95df1
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)
@@ -574,6 +573,7 @@
            case RaiseWindowHook: {
                if (!windowId)
                    return;
                m_delegate->setWindowVisible(m_host, true);
                const auto hwnd = reinterpret_cast<HWND>(windowId);
                bringWindowToFront(hwnd);
                return;
@@ -723,8 +723,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 +1319,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);
                    }
                }