Merge branch '1.1'
This commit is contained in:
@@ -297,6 +297,14 @@ MultiSplitter *FloatingWindow::multiSplitter() const
|
||||
|
||||
bool FloatingWindow::isInDragArea(QPoint globalPoint) const
|
||||
{
|
||||
#ifdef Q_OS_WIN
|
||||
// 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.
|
||||
// Keep track of how we handled the WM_NCHITTEST
|
||||
if (m_lastHitTest != 0 && m_lastHitTest != HTCAPTION)
|
||||
return false;
|
||||
#endif
|
||||
|
||||
return dragRect().contains(globalPoint);
|
||||
}
|
||||
|
||||
|
||||
@@ -55,6 +55,11 @@ public:
|
||||
const Frame::List frames() const;
|
||||
DropArea *dropArea() const { return m_dropArea; }
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
void setLastHitTest(int hitTest) {
|
||||
m_lastHitTest = hitTest;
|
||||
}
|
||||
#endif
|
||||
/**
|
||||
* @brief Returns the title bar.
|
||||
*
|
||||
@@ -153,6 +158,9 @@ private:
|
||||
bool m_updatingTitleBarVisibility = false;
|
||||
QMetaObject::Connection m_layoutDestroyedConnection;
|
||||
QAbstractNativeEventFilter *m_nchittestFilter = nullptr;
|
||||
#ifdef Q_OS_WIN
|
||||
int m_lastHitTest = 0;
|
||||
#endif
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -257,6 +257,7 @@ bool WidgetResizeHandler::handleWindowsNativeEvent(FloatingWindow *w, const QByt
|
||||
}
|
||||
}
|
||||
|
||||
w->setLastHitTest(*result);
|
||||
return *result != 0;
|
||||
} else if (msg->message == WM_NCLBUTTONDBLCLK) {
|
||||
if ((Config::self().flags() & Config::Flag_DoubleClickMaximizes)) {
|
||||
|
||||
Reference in New Issue
Block a user