Remove explicit flush in DataDeviceInterface

This allows the compositor batch events better.

If the event loop is about to block, client connections will be flushed.
This commit is contained in:
Vlad Zahorodnii 2021-06-19 14:17:03 +03:00
parent 98477eabc1
commit 5c6b1f4e8d

View file

@ -238,7 +238,6 @@ void DataDeviceInterface::drop()
disconnect(d->drag.destroyConnection);
d->drag.destroyConnection = QMetaObject::Connection();
d->drag.surface = nullptr;
wl_client_flush(d->resource()->client());
}
void DataDeviceInterface::updateDragTarget(SurfaceInterface *surface, quint32 serial)
@ -288,7 +287,6 @@ void DataDeviceInterface::updateDragTarget(SurfaceInterface *surface, quint32 se
const QPointF pos = d->seat->dragSurfaceTransformation().map(d->seat->pointerPos());
d->send_motion(d->seat->timestamp(),
wl_fixed_from_double(pos.x()), wl_fixed_from_double(pos.y()));
wl_client_flush(d->resource()->client());
}
);
} else if (d->seat->isDragTouch()) {
@ -302,7 +300,6 @@ void DataDeviceInterface::updateDragTarget(SurfaceInterface *surface, quint32 se
const QPointF pos = d->seat->dragSurfaceTransformation().map(globalPosition);
d->send_motion(d->seat->timestamp(),
wl_fixed_from_double(pos.x()), wl_fixed_from_double(pos.y()));
wl_client_flush(d->resource()->client());
}
);
}
@ -344,7 +341,6 @@ void DataDeviceInterface::updateDragTarget(SurfaceInterface *surface, quint32 se
d->drag.targetActionConnection = connect(offer, &DataOfferInterface::dragAndDropActionsChanged, source, matchOffers);
d->drag.sourceActionConnection = connect(source, &DataSourceInterface::supportedDragAndDropActionsChanged, source, matchOffers);
}
wl_client_flush(d->resource()->client());
}
quint32 DataDeviceInterface::dragImplicitGrabSerial() const