diff options
| author | Vaxry <vaxry@vaxry.net> | 2025-12-11 00:50:45 +0000 |
|---|---|---|
| committer | Vaxry <vaxry@vaxry.net> | 2025-12-11 00:50:45 +0000 |
| commit | 9aa313402b1be3df2925076bb1292d03e68bb47f (patch) | |
| tree | bfe2727bff5735458534f415c32e753e71c37f44 /src/protocols/core/DataDevice.cpp | |
| parent | 1ff801f5f32c2d905aee9ce3845e7c350479e53b (diff) | |
protocols/datadevice: avoid double leave
ref https://github.com/hyprwm/Hyprland/discussions/12494
Diffstat (limited to 'src/protocols/core/DataDevice.cpp')
| -rw-r--r-- | src/protocols/core/DataDevice.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/protocols/core/DataDevice.cpp b/src/protocols/core/DataDevice.cpp index a42933ed..4a24e861 100644 --- a/src/protocols/core/DataDevice.cpp +++ b/src/protocols/core/DataDevice.cpp @@ -298,10 +298,17 @@ void CWLDataDeviceResource::sendDataOffer(SP<IDataOffer> offer) { void CWLDataDeviceResource::sendEnter(uint32_t serial, SP<CWLSurfaceResource> surf, const Vector2D& local, SP<IDataOffer> offer) { if (const auto WL = offer->getWayland(); WL) m_resource->sendEnterRaw(serial, surf->getResource()->resource(), wl_fixed_from_double(local.x), wl_fixed_from_double(local.y), WL->m_resource->resource()); + + m_entered = surf; + // FIXME: X11 } void CWLDataDeviceResource::sendLeave() { + if (!m_entered) + return; + + m_entered.reset(); m_resource->sendLeave(); } |
