Fix Flag_NativeTitleBar

It shouldn't use the FloatingWindow::isInDragArea() code path
This commit is contained in:
Sergio Martins
2021-01-17 23:11:41 +00:00
parent c4e7db34a4
commit 370d139dfc
2 changed files with 8 additions and 1 deletions

View File

@@ -605,7 +605,7 @@ bool DragController::eventFilter(QObject *o, QEvent *e)
switch (e->type()) {
case QEvent::NonClientAreaMouseButtonPress: {
if (auto fw = qobject_cast<FloatingWindow*>(o)) {
if (fw->isInDragArea(Qt5Qt6Compat::eventGlobalPos(me))) {
if (KDDockWidgets::usesNativeTitleBar() || fw->isInDragArea(Qt5Qt6Compat::eventGlobalPos(me))) {
m_nonClientDrag = true;
return activeState()->handleMouseButtonPress(draggableForQObject(o), Qt5Qt6Compat::eventGlobalPos(me), me->pos());
}