13#include "core/DropIndicatorOverlay_p.h"
20#include "core/Logging_p.h"
21#include "core/Controller_p.h"
22#include "core/WindowBeingDragged_p.h"
24#include "core/DragController_p.h"
25#include "core/DockRegistry_p.h"
33 , m_dropArea(dropArea)
42 d->dropIndicatorsInhibitedConnection =
DockRegistry::self()->
dptr()->dropIndicatorsInhibitedChanged.connect([
this](
bool inhibited) {
47 if (
auto state = object_cast<StateDragging *>(DragController::instance()->activeState())) {
84 return m_hoveredGroupRect;
92 if (WindowBeingDragged *wbd = DragController::instance()->windowBeingDragged()) {
93 if (wbd->isInWaylandDrag(group)) {
107 d->groupConnection = group->Controller::dptr()->aboutToBeDeleted.connect([
this] { onGroupDestroyed(); });
110 setHoveredGroupRect(Rect());
125 return m_currentDropLocation;
151 KDDW_ERROR(
"Unexpected drop location={}", dropLoc);
163 WindowBeingDragged *windowBeingDragged = DragController::instance()->windowBeingDragged();
164 if (!windowBeingDragged)
176 }
else if (isOutter) {
191 windowBeingDragged->affinities()))
194 KDDW_ERROR(
"Unknown drop indicator location={}", dropLoc);
198 if (
auto dropIndicatorAllowedFunc =
Config::self().dropIndicatorAllowedFunc()) {
199 DropArea *dropArea = DragController::instance()->dropAreaUnderCursor();
200 if (!dropIndicatorAllowedFunc(dropLoc, source, target, dropArea))
207void DropIndicatorOverlay::onGroupDestroyed()
223 if (m_currentDropLocation != location) {
224 m_currentDropLocation = location;
225 d->currentDropLocationChanged.emit();
236void DropIndicatorOverlay::setHoveredGroupRect(Rect rect)
238 if (m_hoveredGroupRect !=
rect) {
239 m_hoveredGroupRect =
rect;
240 d->hoveredGroupRectChanged.emit();
Application-wide config to tune certain behaviours of the framework.
A ScopedConnection is a RAII-style way to make sure a Connection is disconnected.
A MultiSplitter with support for drop indicators when hovering over.