Send HoverMove event to selected window decoration if buttons are pressed

Ensures that e.g. decoration buttons get the Leave events.
This commit is contained in:
Martin Gräßlin 2015-06-05 00:07:07 +02:00
parent 735ffc8ab2
commit 545c8b190e

View file

@ -521,6 +521,11 @@ void InputRedirection::processPointerMotion(const QPointF &pos, uint32_t time)
if (!areButtonsPressed()) {
// update pointer window only if no button is pressed
updatePointerWindow();
} else if (m_pointerDecoration) {
const QPointF p = m_globalPointer - m_pointerDecoration->client()->pos();
QHoverEvent event(QEvent::HoverMove, p, p);
QCoreApplication::instance()->sendEvent(m_pointerDecoration->decoration(), &event);
m_pointerDecoration->client()->processDecorationMove();
}
#if HAVE_WAYLAND
if (auto seat = findSeat()) {