summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorvaxerski <vaxry@vaxry.net>2025-01-02 15:58:28 +0100
committervaxerski <vaxry@vaxry.net>2025-01-02 15:58:28 +0100
commit94381e59991824ab9a5a9cb5fe701181fbcbc81d (patch)
tree858e16332037418c33a5d2570c45b2111a4fc8ab /src
parent42fd366046d67c52449001b6a6e9b64427aee712 (diff)
dnd/seat: avoid sending button events during a dnd op
fixes #8781
Diffstat (limited to 'src')
-rw-r--r--src/managers/SeatManager.cpp2
-rw-r--r--src/protocols/core/DataDevice.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/managers/SeatManager.cpp b/src/managers/SeatManager.cpp
index b169faeb..3b9a4925 100644
--- a/src/managers/SeatManager.cpp
+++ b/src/managers/SeatManager.cpp
@@ -281,7 +281,7 @@ void CSeatManager::sendPointerMotion(uint32_t timeMs, const Vector2D& local) {
}
void CSeatManager::sendPointerButton(uint32_t timeMs, uint32_t key, wl_pointer_button_state state_) {
- if (!state.pointerFocusResource)
+ if (!state.pointerFocusResource || PROTO::data->dndActive())
return;
for (auto const& s : seatResources) {
diff --git a/src/protocols/core/DataDevice.cpp b/src/protocols/core/DataDevice.cpp
index 9fc49a44..6ad17d7b 100644
--- a/src/protocols/core/DataDevice.cpp
+++ b/src/protocols/core/DataDevice.cpp
@@ -808,5 +808,5 @@ void CWLDataDeviceProtocol::renderDND(PHLMONITOR pMonitor, timespec* when) {
}
bool CWLDataDeviceProtocol::dndActive() {
- return dnd.currentSource && dnd.mouseButton /* test a member of the state to ensure it's also present */;
+ return dnd.currentSource;
}