dnd/seat: avoid sending button events during a dnd op

fixes #8781
This commit is contained in:
Vaxry 2025-01-02 15:58:28 +01:00
parent 42fd366046
commit 94381e5999
2 changed files with 2 additions and 2 deletions

View file

@ -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_) { void CSeatManager::sendPointerButton(uint32_t timeMs, uint32_t key, wl_pointer_button_state state_) {
if (!state.pointerFocusResource) if (!state.pointerFocusResource || PROTO::data->dndActive())
return; return;
for (auto const& s : seatResources) { for (auto const& s : seatResources) {

View file

@ -808,5 +808,5 @@ void CWLDataDeviceProtocol::renderDND(PHLMONITOR pMonitor, timespec* when) {
} }
bool CWLDataDeviceProtocol::dndActive() { bool CWLDataDeviceProtocol::dndActive() {
return dnd.currentSource && dnd.mouseButton /* test a member of the state to ensure it's also present */; return dnd.currentSource;
} }