data-device: send clock time in motion events

remove hack
This commit is contained in:
Vaxry 2024-09-14 23:35:45 +01:00
parent d35e70a8c6
commit 5ee4b19691

View file

@ -513,7 +513,10 @@ void CWLDataDeviceProtocol::initiateDrag(WP<CWLDataSourceResource> currentSource
if (!box.has_value()) if (!box.has_value())
return; return;
dnd.focusedDevice->sendMotion(0 /* this is a hack */, V - box->pos()); timespec timeNow;
clock_gettime(CLOCK_MONOTONIC, &timeNow);
dnd.focusedDevice->sendMotion(timeNow.tv_sec * 1000 + timeNow.tv_nsec / 1000000, V - box->pos());
LOGM(LOG, "Drag motion {}", V - box->pos()); LOGM(LOG, "Drag motion {}", V - box->pos());
} }
}); });