minor tweaks
This commit is contained in:
parent
0ce47469a9
commit
9279500c18
|
@ -416,14 +416,15 @@ Short answer: it's impossible. Full explaination: of course we can use the same
|
|||
|
||||
## Special Thanks
|
||||
|
||||
*Ordered by first contribution time*
|
||||
*Ordered by first contribution time (it may not be very accurate, sorry)*
|
||||
|
||||
- [Yuhang Zhao](https://github.com/wangwenx190): Help me create this project. This project is mainly based on his code.
|
||||
- [Julien](https://github.com/JulienMaille): Help me test this library on many various environments and help me fix the bugs we found. Contributed many code to improve this library. The MainWindow example is mostly based on his code.
|
||||
- [Altair Wei](https://github.com/altairwei): Help me fix quite some small bugs and give me many important suggestions, the 2.x version is also inspired by his idea during our discussions.
|
||||
- [Kenji Mouri](https://github.com/MouriNaruto): Give me a lot of help on Win32 native developing.
|
||||
- [Dylan Liu](https://github.com/mentalfl0w): Help me improve the build process on macOS.
|
||||
- [SineStriker](https://github.com/SineStriker): He spent almost a whole week helping me improve the Snap Layout implementation, fix potential bugs and give me a lot of useful suggestions. Without his great effort, the new implementation may never come.
|
||||
- [SineStriker](https://github.com/SineStriker): Spent over a whole week helping me improve the Snap Layout implementation, fixing potential bugs and also give me a lot of professional and useful suggestions. Without his great effort, the new implementation may never come.
|
||||
- And also thanks to other contributors not listed here! Without their valuable help, this library wouldn't have such good quality and user experience!
|
||||
|
||||
## License
|
||||
|
||||
|
|
|
@ -103,14 +103,11 @@ enum class WindowPart : quint8
|
|||
struct FramelessWin32HelperData
|
||||
{
|
||||
SystemParameters params = {};
|
||||
|
||||
// Store the last result of WM_NCHITTEST, it's helpful to handle WM_MOUSEMOVE and WM_NCMOUSELEAVE
|
||||
// Store the last hit test result, it's helpful to handle WM_MOUSEMOVE and WM_NCMOUSELEAVE.
|
||||
WindowPart lastHitTestResult = WindowPart::Outside;
|
||||
|
||||
// Store true if we blocked a WM_MOUSELEAVE when mouse moves on chrome button, reset when a
|
||||
// WM_MOUSELEAVE comes or we manually call TrackMouseEvent
|
||||
// True if we blocked a WM_MOUSELEAVE when mouse moves on chrome button, false when a
|
||||
// WM_MOUSELEAVE comes or we manually call TrackMouseEvent().
|
||||
bool mouseLeaveBlocked = false;
|
||||
|
||||
Dpi dpi = {};
|
||||
#if (QT_VERSION < QT_VERSION_CHECK(6, 5, 1))
|
||||
QRect restoreGeometry = {};
|
||||
|
@ -471,7 +468,7 @@ bool FramelessHelperWin::nativeEventFilter(const QByteArray &eventType, void *me
|
|||
}
|
||||
muData.mouseLeaveBlocked = false;
|
||||
}
|
||||
|
||||
|
||||
switch (uMsg) {
|
||||
#if (QT_VERSION < QT_VERSION_CHECK(5, 9, 0)) // Qt has done this for us since 5.9.0
|
||||
case WM_NCCREATE: {
|
||||
|
@ -990,12 +987,12 @@ bool FramelessHelperWin::nativeEventFilter(const QByteArray &eventType, void *me
|
|||
}
|
||||
return true;
|
||||
}
|
||||
case WM_MOUSEMOVE: {
|
||||
if (data.lastHitTestResult != WindowPart::ChromeButton && data.mouseLeaveBlocked) {
|
||||
case WM_MOUSEMOVE:
|
||||
if ((data.lastHitTestResult != WindowPart::ChromeButton) && data.mouseLeaveBlocked) {
|
||||
muData.mouseLeaveBlocked = false;
|
||||
std::ignore = requestForMouseLeaveMessage(hWnd, false);
|
||||
}
|
||||
} break;
|
||||
break;
|
||||
case WM_NCMOUSEMOVE:
|
||||
case WM_NCLBUTTONDOWN:
|
||||
case WM_NCLBUTTONUP:
|
||||
|
@ -1140,10 +1137,10 @@ bool FramelessHelperWin::nativeEventFilter(const QByteArray &eventType, void *me
|
|||
#endif // (QT_VERSION < QT_VERSION_CHECK(6, 5, 1))
|
||||
data.params.forceChildrenRepaint(500);
|
||||
} break;
|
||||
case WM_DWMCOMPOSITIONCHANGED: {
|
||||
case WM_DWMCOMPOSITIONCHANGED:
|
||||
// Re-apply the custom window frame if recovered from the basic theme.
|
||||
std::ignore = Utils::updateWindowFrameMargins(windowId, false);
|
||||
} break;
|
||||
break;
|
||||
#if (QT_VERSION < QT_VERSION_CHECK(6, 5, 1))
|
||||
case WM_ENTERSIZEMOVE: // Sent to a window when the user drags the title bar or the resize border.
|
||||
case WM_EXITSIZEMOVE: // Sent to a window when the user releases the mouse button (from dragging the title bar or the resize border).
|
||||
|
|
Loading…
Reference in New Issue