From 59690b8ab4f3e4c2cea0467f40e858080943dd62 Mon Sep 17 00:00:00 2001 From: Zhao Yuhang <2546789017@qq.com> Date: ćšć, 14 12æ 2023 20:45:33 +0800 Subject: [PATCH] tweak --- src/widgets/widgetwindowagent_win.cpp | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/widgets/widgetwindowagent_win.cpp b/src/widgets/widgetwindowagent_win.cpp index 2a67ebb..aa7e9c0 100644 --- a/src/widgets/widgetwindowagent_win.cpp +++ b/src/widgets/widgetwindowagent_win.cpp @@ -35,7 +35,7 @@ bool nativeEventFilter(const QByteArray &eventType, void *message, QT_NATIVE_EVENT_RESULT_TYPE *result) override { Q_UNUSED(eventType) - auto msg = reinterpret_cast<const MSG *>(message); + const auto msg = static_cast<const MSG *>(message); switch (msg->message) { case WM_DPICHANGED: { updateGeometry(); @@ -67,7 +67,7 @@ bool eventFilter(QObject *obj, QEvent *event) override { switch (event->type()) { case QEvent::Paint: { - if (widget->windowState() & (Qt::WindowMaximized | Qt::WindowFullScreen)) + if (widget->windowState() & (Qt::WindowMinimized | Qt::WindowMaximized | Qt::WindowFullScreen)) break; auto paintEvent = static_cast<QPaintEvent *>(event); @@ -81,7 +81,7 @@ ®ion, }; ctx->virtual_hook(AbstractWindowContext::DrawWindows10BorderHook, args); - return true; + break; } case QEvent::WindowStateChange: { @@ -115,4 +115,4 @@ } -#include "widgetwindowagent_win.moc" \ No newline at end of file +#include "widgetwindowagent_win.moc" -- Gitblit v1.9.1