Fix FloatingWindow::isInDragArea() returning false even with HTCAPTION
If the last clicked position is HTCAPTION then we're sure we're dragging. Problem with comparing the rect is that mouse events are async, and by the time we use the mouse event pos the window is already somewhere else. So just use HTCAPTION, which is 100% correct. Fixes #103
This commit is contained in:
@@ -8,6 +8,7 @@
|
|||||||
- Added Config::Flag_CloseOnlyCurrentTab
|
- Added Config::Flag_CloseOnlyCurrentTab
|
||||||
- PySide6 support
|
- PySide6 support
|
||||||
- Layout restorer now restores maximzied/minimized state too (#81)
|
- Layout restorer now restores maximzied/minimized state too (#81)
|
||||||
|
- Fixed dock indicators sometimes not appearing on Windows (#103)
|
||||||
|
|
||||||
* v1.2.1 (unreleased)
|
* v1.2.1 (unreleased)
|
||||||
- Support for resizing dock widgets when they are in overlay/popup mode (autohide/sidebar feature)
|
- Support for resizing dock widgets when they are in overlay/popup mode (autohide/sidebar feature)
|
||||||
|
|||||||
@@ -301,8 +301,8 @@ bool FloatingWindow::isInDragArea(QPoint globalPoint) const
|
|||||||
// A click near the border will still send a Qt::NonClientMousePressEvent. We shouldn't
|
// A click near the border will still send a Qt::NonClientMousePressEvent. We shouldn't
|
||||||
// interpret that as a drag, as it's for a native resize.
|
// interpret that as a drag, as it's for a native resize.
|
||||||
// Keep track of how we handled the WM_NCHITTEST
|
// Keep track of how we handled the WM_NCHITTEST
|
||||||
if (m_lastHitTest != 0 && m_lastHitTest != HTCAPTION)
|
if (usesAeroSnapWithCustomDecos())
|
||||||
return false;
|
return m_lastHitTest == HTCAPTION;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return dragRect().contains(globalPoint);
|
return dragRect().contains(globalPoint);
|
||||||
|
|||||||
Reference in New Issue
Block a user