diff options
| author | Vaxry <vaxry@vaxry.net> | 2024-06-16 16:23:35 +0200 |
|---|---|---|
| committer | Vaxry <vaxry@vaxry.net> | 2024-06-16 16:23:41 +0200 |
| commit | 1b5444494d26624804de8f479da3cffb5d480dc6 (patch) | |
| tree | 68375cdd4bc40837b58f2aae3dae5533ee5d11d5 /src/protocols/core/DataDevice.cpp | |
| parent | 3eaf35f1e2d984bea89ab1d8a5abbef66243aa5d (diff) | |
seat/dnd: unfocus pointer from surfaces on dnd start
GTK is speshyal and requires this for functioning properly. Ugh.
It's technically not required by spec, f you gtk.
Ref #6509
Diffstat (limited to 'src/protocols/core/DataDevice.cpp')
| -rw-r--r-- | src/protocols/core/DataDevice.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/protocols/core/DataDevice.cpp b/src/protocols/core/DataDevice.cpp index 86b372bf..03c51852 100644 --- a/src/protocols/core/DataDevice.cpp +++ b/src/protocols/core/DataDevice.cpp @@ -542,6 +542,11 @@ void CWLDataDeviceProtocol::initiateDrag(WP<CWLDataSourceResource> currentSource } }); + // unfocus the pointer from the surface, this is part of """standard""" wayland procedure and gtk will freak out if this isn't happening. + // BTW, the spec does NOT require this explicitly... + // Fuck you gtk. + g_pSeatManager->setPointerFocus(nullptr, {}); + // make a new offer, etc updateDrag(); } @@ -638,7 +643,7 @@ void CWLDataDeviceProtocol::completeDrag() { dnd.focusedDevice.reset(); dnd.currentSource.reset(); - g_pSeatManager->resendEnterEvents(); + g_pInputManager->simulateMouseMovement(); } void CWLDataDeviceProtocol::abortDrag() { @@ -657,7 +662,7 @@ void CWLDataDeviceProtocol::abortDrag() { dnd.focusedDevice.reset(); dnd.currentSource.reset(); - g_pSeatManager->resendEnterEvents(); + g_pInputManager->simulateMouseMovement(); } void CWLDataDeviceProtocol::renderDND(CMonitor* pMonitor, timespec* when) { |
