From 50f70711727169005a4bd9fb7b1add9855f432c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=B1=E5=AD=90=E6=A5=9A=5Czhuzi?= Date: Mon, 26 Feb 2024 18:28:35 +0800 Subject: [PATCH] fix bug #436 --- src/FluFramelessHelper.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/FluFramelessHelper.cpp b/src/FluFramelessHelper.cpp index 2fffcd18..835fda36 100644 --- a/src/FluFramelessHelper.cpp +++ b/src/FluFramelessHelper.cpp @@ -325,13 +325,13 @@ void FluFramelessHelper::componentComplete(){ exstyle = exstyle | WS_EX_LAYERED; SetWindowLongPtr(hwnd, GWL_EXSTYLE, exstyle); SetLayeredWindowAttributes(hwnd, RGB(251, 255, 242), 0, LWA_COLORKEY); - SetWindowPos(hwnd,nullptr,0,0,0,0,SWP_NOZORDER | SWP_NOOWNERZORDER | SWP_NOMOVE | SWP_NOSIZE | SWP_FRAMECHANGED); connect(window,&QQuickWindow::activeChanged,this,[this,hwnd]{ if(this->window->isActive()){ LONG exstyle = ::GetWindowLong(hwnd, GWL_EXSTYLE); if(exstyle & WS_EX_LAYERED){ exstyle = exstyle &~ WS_EX_LAYERED; SetWindowLongPtr(hwnd, GWL_EXSTYLE, exstyle); + SetWindowPos(hwnd,nullptr,0,0,0,0,SWP_NOZORDER | SWP_NOOWNERZORDER | SWP_NOMOVE | SWP_NOSIZE | SWP_FRAMECHANGED); } } });