mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-23 05:06:00 +01:00
parent
d0a6fa7aa6
commit
2031af82fa
1 changed files with 4 additions and 3 deletions
|
@ -606,15 +606,15 @@ void CWLDataDeviceProtocol::dropDrag() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
dnd.currentSource->sendDndDropPerformed();
|
|
||||||
dnd.focusedDevice->sendDrop();
|
dnd.focusedDevice->sendDrop();
|
||||||
dnd.focusedDevice->sendLeave();
|
|
||||||
|
|
||||||
resetDndState();
|
resetDndState();
|
||||||
|
|
||||||
if (dnd.overriddenCursor)
|
if (dnd.overriddenCursor)
|
||||||
g_pInputManager->unsetCursorImage();
|
g_pInputManager->unsetCursorImage();
|
||||||
dnd.overriddenCursor = false;
|
dnd.overriddenCursor = false;
|
||||||
|
|
||||||
|
g_pInputManager->simulateMouseMovement();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CWLDataDeviceProtocol::wasDragSuccessful() {
|
bool CWLDataDeviceProtocol::wasDragSuccessful() {
|
||||||
|
@ -638,6 +638,7 @@ void CWLDataDeviceProtocol::completeDrag() {
|
||||||
if (!dnd.focusedDevice || !dnd.currentSource)
|
if (!dnd.focusedDevice || !dnd.currentSource)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
dnd.currentSource->sendDndDropPerformed();
|
||||||
dnd.currentSource->sendDndFinished();
|
dnd.currentSource->sendDndFinished();
|
||||||
|
|
||||||
dnd.focusedDevice.reset();
|
dnd.focusedDevice.reset();
|
||||||
|
@ -681,5 +682,5 @@ void CWLDataDeviceProtocol::renderDND(CMonitor* pMonitor, timespec* when) {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CWLDataDeviceProtocol::dndActive() {
|
bool CWLDataDeviceProtocol::dndActive() {
|
||||||
return dnd.currentSource;
|
return dnd.currentSource && dnd.mouseButton /* test a member of the state to ensure it's also present */;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue