diff options
author | Vaxry <[email protected]> | 2024-06-16 17:41:16 +0200 |
---|---|---|
committer | Vaxry <[email protected]> | 2024-06-16 17:41:16 +0200 |
commit | 2031af82fa029aa098357339d502b53c371919d4 (patch) | |
tree | f049be48c7b73bac6fdd81c0c25619574e7c9333 | |
parent | d0a6fa7aa6c3a9d94611130a9213de19a8754d67 (diff) | |
download | Hyprland-2031af82fa029aa098357339d502b53c371919d4.tar.gz Hyprland-2031af82fa029aa098357339d502b53c371919d4.zip |
wl_data_device: send drop_performed in completeDrag
ref #6509
-rw-r--r-- | src/protocols/core/DataDevice.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/protocols/core/DataDevice.cpp b/src/protocols/core/DataDevice.cpp index 03c51852..e54d3633 100644 --- a/src/protocols/core/DataDevice.cpp +++ b/src/protocols/core/DataDevice.cpp @@ -606,15 +606,15 @@ void CWLDataDeviceProtocol::dropDrag() { return; } - dnd.currentSource->sendDndDropPerformed(); dnd.focusedDevice->sendDrop(); - dnd.focusedDevice->sendLeave(); resetDndState(); if (dnd.overriddenCursor) g_pInputManager->unsetCursorImage(); dnd.overriddenCursor = false; + + g_pInputManager->simulateMouseMovement(); } bool CWLDataDeviceProtocol::wasDragSuccessful() { @@ -638,6 +638,7 @@ void CWLDataDeviceProtocol::completeDrag() { if (!dnd.focusedDevice || !dnd.currentSource) return; + dnd.currentSource->sendDndDropPerformed(); dnd.currentSource->sendDndFinished(); dnd.focusedDevice.reset(); @@ -681,5 +682,5 @@ void CWLDataDeviceProtocol::renderDND(CMonitor* pMonitor, timespec* when) { } bool CWLDataDeviceProtocol::dndActive() { - return dnd.currentSource; + return dnd.currentSource && dnd.mouseButton /* test a member of the state to ensure it's also present */; } |