From ae2d517ad017373b5b17f975c8d167fc24f63604 Mon Sep 17 00:00:00 2001 From: zhuzichu Date: Fri, 5 Jan 2024 18:18:08 +0800 Subject: [PATCH] update --- src/FluFramelessHelper.cpp | 15 ++------------- src/FluNetwork.cpp | 2 +- 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/src/FluFramelessHelper.cpp b/src/FluFramelessHelper.cpp index 0a07693a..997eeb87 100644 --- a/src/FluFramelessHelper.cpp +++ b/src/FluFramelessHelper.cpp @@ -16,15 +16,6 @@ static inline QByteArray qtNativeEventType() return result; } -static inline bool isTaskbarAutoHide() { - APPBARDATA appBarData; - memset(&appBarData, 0, sizeof(appBarData)); - appBarData.cbSize = sizeof(appBarData); - appBarData.hWnd = FindWindowW(L"Shell_TrayWnd", NULL); - LPARAM lParam = SHAppBarMessage(ABM_GETSTATE, &appBarData); - return lParam & ABS_AUTOHIDE; -} - static inline QColor getAccentColor(){ typedef HRESULT (WINAPI* DwmGetColorizationColorPtr)(DWORD* pcrColorization,BOOL* pfOpaqueBlend); HMODULE module = LoadLibraryW(L"dwmapi.dll"); @@ -126,9 +117,6 @@ bool FramelessEventFilter::nativeEventFilter(const QByteArray &eventType, void * bool isMax = IsZoomed(hwnd); if(isMax){ _helper->setOriginalPos(QPoint(originalLeft,originalTop)); - if(isTaskbarAutoHide()){ - clientRect->bottom -= 1; - } offsetTop = 0; }else{ _helper->setOriginalPos({}); @@ -148,7 +136,8 @@ bool FramelessEventFilter::nativeEventFilter(const QByteArray &eventType, void * } return true; } - return false; + *result = HTCLIENT; + return true; }else if(uMsg == WM_NCLBUTTONDBLCLK || uMsg == WM_NCLBUTTONDOWN){ if(FluTools::getInstance()->isWindows11OrGreater() && _helper->hoverMaxBtn() && _helper->resizeable()){ QMouseEvent event = QMouseEvent(QEvent::MouseButtonPress, QPoint(), QPoint(), Qt::LeftButton, Qt::LeftButton, Qt::NoModifier); diff --git a/src/FluNetwork.cpp b/src/FluNetwork.cpp index 1829c635..9875ca58 100644 --- a/src/FluNetwork.cpp +++ b/src/FluNetwork.cpp @@ -162,7 +162,7 @@ QString NetworkParams::buildCacheKey(){ void NetworkParams::go(NetworkCallable* callable){ QJSValueList data; - data<newQObject(this); + data<newQObject(this); FluNetwork::getInstance()->_interceptor.call(data); if(_downloadParam){ FluNetwork::getInstance()->handleDownload(this,callable);