From 83a66b3f155807e01e0e8f8bc5895b733461326b Mon Sep 17 00:00:00 2001 From: zhuzichu Date: Thu, 21 Dec 2023 10:44:46 +0800 Subject: [PATCH] update --- src/FluFramelessHelper.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/FluFramelessHelper.cpp b/src/FluFramelessHelper.cpp index 2c95896d..5e04d7f2 100644 --- a/src/FluFramelessHelper.cpp +++ b/src/FluFramelessHelper.cpp @@ -212,7 +212,7 @@ void FluFramelessHelper::componentComplete(){ _nativeEvent =new FramelessEventFilter(_window); qApp->installNativeEventFilter(_nativeEvent); HWND hwnd = reinterpret_cast(_window->winId()); - SetWindowPos(hwnd,nullptr,0,0,0,0,SWP_NOZORDER | SWP_NOOWNERZORDER | SWP_NOMOVE | SWP_NOSIZE |SWP_FRAMECHANGED); + SetWindowPos(hwnd,0,0,0,0,0,SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_FRAMECHANGED | SWP_NOOWNERZORDER); showShadow(hwnd); #endif _stayTop = QQmlProperty(_window,"stayTop"); @@ -227,10 +227,9 @@ void FluFramelessHelper::componentComplete(){ void FluFramelessHelper::_onScreenChanged(){ #ifdef Q_OS_WIN HWND hwnd = reinterpret_cast(_window->winId()); - SetWindowPos(hwnd,nullptr,0,0,0,0,SWP_NOZORDER | SWP_NOOWNERZORDER | SWP_NOMOVE | SWP_NOSIZE |SWP_FRAMECHANGED); + SetWindowPos(hwnd,0,0,0,0,0,SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_FRAMECHANGED | SWP_NOOWNERZORDER); + RedrawWindow(hwnd, NULL, NULL, RDW_INVALIDATE | RDW_UPDATENOW); #endif - _window->update(); - QGuiApplication::processEvents(); } void FluFramelessHelper::_onStayTopChange(){