From 61f65f23ffee628344fb9ebb0f71e1d7c480976b Mon Sep 17 00:00:00 2001
From: Zhao Yuhang <2546789017@qq.com>
Date: 周日, 17 12月 2023 19:29:47 +0800
Subject: [PATCH] improve readability

---
 src/core/contexts/win32windowcontext.cpp |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/core/contexts/win32windowcontext.cpp b/src/core/contexts/win32windowcontext.cpp
index da79c89..864f552 100644
--- a/src/core/contexts/win32windowcontext.cpp
+++ b/src/core/contexts/win32windowcontext.cpp
@@ -1548,8 +1548,9 @@
                 // the client area as a whole will shift to the left, which looks very abnormal if
                 // we don't repaint it. This exception disappears if we add SWP_NOCOPYBITS flag.
                 // But I don't know what caused the problem, or why this would solve it.
+                static constexpr const auto kBadWindowPosFlag = SWP_NOSIZE | SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE | SWP_FRAMECHANGED;
                 const auto windowPos = reinterpret_cast<LPWINDOWPOS>(lParam);
-                if (windowPos->flags == 0x37) {
+                if (windowPos->flags == kBadWindowPosFlag) {
                     windowPos->flags |= SWP_NOCOPYBITS;
                 }
                 break;

--
Gitblit v1.9.1