Pass the DropArea to setDropIndicatorAllowedFunc() too
So the lambda can have more advanced usage and inspect the target layout before allowing or disallowing the drop. For our use case, we want to limit max 3 dock widgets side by side, for example.
This commit is contained in:
@@ -161,7 +161,8 @@ bool DropIndicatorOverlayInterface::dropIndicatorVisible(DropLocation dropLoc) c
|
||||
}
|
||||
|
||||
if (auto dropIndicatorAllowedFunc = Config::self().dropIndicatorAllowedFunc()) {
|
||||
if (!dropIndicatorAllowedFunc(dropLoc, source, target))
|
||||
DropArea *dropArea = DragController::instance()->dropAreaUnderCursor();
|
||||
if (!dropIndicatorAllowedFunc(dropLoc, source, target, dropArea))
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user