parent
fb8f061091
commit
76c13cf9bf
|
@ -572,8 +572,9 @@ bool FramelessHelperWin::nativeEventFilter(const QByteArray &eventType, void *me
|
||||||
}
|
}
|
||||||
const bool isTop = localMouse.y() <= resizeBorderThickness;
|
const bool isTop = localMouse.y() <= resizeBorderThickness;
|
||||||
*result = [clientRect, isTitleBar, &localMouse, resizeBorderThickness, windowWidth, isTop, window, max](){
|
*result = [clientRect, isTitleBar, &localMouse, resizeBorderThickness, windowWidth, isTop, window, max](){
|
||||||
|
const bool mousePressed = GetSystemMetrics(SM_SWAPBUTTON) ? GetAsyncKeyState(VK_RBUTTON) < 0 : GetAsyncKeyState(VK_LBUTTON) < 0;
|
||||||
if (max) {
|
if (max) {
|
||||||
if (isTitleBar) {
|
if (isTitleBar && mousePressed) {
|
||||||
return HTCAPTION;
|
return HTCAPTION;
|
||||||
}
|
}
|
||||||
return HTCLIENT;
|
return HTCLIENT;
|
||||||
|
@ -612,7 +613,7 @@ bool FramelessHelperWin::nativeEventFilter(const QByteArray &eventType, void *me
|
||||||
if (isRight) {
|
if (isRight) {
|
||||||
return getBorderValue(HTRIGHT);
|
return getBorderValue(HTRIGHT);
|
||||||
}
|
}
|
||||||
if (isTitleBar) {
|
if (isTitleBar && mousePressed) {
|
||||||
return HTCAPTION;
|
return HTCAPTION;
|
||||||
}
|
}
|
||||||
return HTCLIENT;
|
return HTCLIENT;
|
||||||
|
|
Loading…
Reference in New Issue