nested_mdi: Fix DnD over dock widgets docked in MDI

Dragging was always detecting the main window's drop indicator
overlay. Make it transparent for mouse events, so that
QWidget::childAt() doesn't pick it, and we can see the inner
drop areas.
This commit is contained in:
Sergio Martins
2022-01-23 23:09:28 +00:00
parent 86bceb4c48
commit 128645693c
2 changed files with 5 additions and 4 deletions

View File

@@ -24,6 +24,9 @@ DropIndicatorOverlayInterface::DropIndicatorOverlayInterface(DropArea *dropArea)
setVisible(false);
setObjectName(QStringLiteral("DropIndicatorOverlayInterface"));
// Set transparent for mouse events so that topLevel->childAt() never returns the drop indicator overlay
setAttribute(Qt::WA_TransparentForMouseEvents);
connect(DockRegistry::self(), &DockRegistry::dropIndicatorsInhibitedChanged, this,
[this](bool inhibited) {
if (inhibited)