From c8a5a82994e513acb00ba0e1f0b882ccbb18a6db Mon Sep 17 00:00:00 2001 From: Sine Striker <trueful@163.com> Date: 周二, 26 12月 2023 05:15:47 +0800 Subject: [PATCH] clean code --- src/core/contexts/win32windowcontext.cpp | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/core/contexts/win32windowcontext.cpp b/src/core/contexts/win32windowcontext.cpp index 98f47d6..8f5a9b6 100644 --- a/src/core/contexts/win32windowcontext.cpp +++ b/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) @@ -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); } } -- Gitblit v1.9.1