Support MainWindow being embedded into a widget on Linux/macOS too

Dragging indicators weren't being shown.

Suprisingly we already had a test for this: tst_embeddedMainWindow
But it passed on offscreen, just failed with xcb, which we don't
usually run
This commit is contained in:
Sergio Martins
2019-12-18 17:51:53 +00:00
parent 4a2a718f78
commit cdc70ec34b

View File

@@ -469,7 +469,7 @@ QWidgetOrQuick *DragController::qtTopLevelUnderCursor() const
if (auto tl = qtTopLevelUnderCursor_impl(globalPos, DockRegistry::self()->nestedwindows(), m_windowBeingDragged->floatingWindow()))
return tl;
return qtTopLevelUnderCursor_impl(globalPos, DockRegistry::self()->mainwindows(), static_cast<MainWindowBase*>(nullptr));
return qtTopLevelUnderCursor_impl(globalPos, DockRegistry::self()->topLevels(/*excludeFloating=*/true), static_cast<QWidget*>(nullptr));
}
#else
// QtQuick: