aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorVaxry <[email protected]>2024-09-14 23:35:45 +0100
committerVaxry <[email protected]>2024-09-14 23:35:45 +0100
commit5ee4b19691f413072f6877940ed709774333f84b (patch)
tree2473ad24d50ae9a85a3224fcf97311086bd91c5e
parentd35e70a8c6599bb058cf86eb87c783ce1cf72471 (diff)
downloadHyprland-5ee4b19691f413072f6877940ed709774333f84b.tar.gz
Hyprland-5ee4b19691f413072f6877940ed709774333f84b.zip
data-device: send clock time in motion events
remove hack
-rw-r--r--src/protocols/core/DataDevice.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/protocols/core/DataDevice.cpp b/src/protocols/core/DataDevice.cpp
index 8c1a48d8..43a63949 100644
--- a/src/protocols/core/DataDevice.cpp
+++ b/src/protocols/core/DataDevice.cpp
@@ -513,7 +513,10 @@ void CWLDataDeviceProtocol::initiateDrag(WP<CWLDataSourceResource> currentSource
if (!box.has_value())
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());
}
});