Client decorations: Don't spam mouse leave events

Previously, we would send one leave event each time the mouse was moved on the
decorations.

Change-Id: I57bd6e57261447db8a8c5ab45dc8f3fdfed33a49
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
This commit is contained in:
Johan Klokkhammer Helsing 2018-08-10 11:54:54 +02:00 committed by Johan Helsing
parent ee24f1a145
commit 0848300f0b

View File

@ -837,8 +837,10 @@ void QWaylandWindow::handleMouseEventWithDecoration(QWaylandInputDevice *inputDe
{
if (mMousePressedInContentArea == Qt::NoButton &&
mWindowDecoration->handleMouse(inputDevice, e.local, e.global, e.buttons, e.modifiers)) {
if (mMouseEventsInContentArea)
if (mMouseEventsInContentArea) {
QWindowSystemInterface::handleLeaveEvent(window());
mMouseEventsInContentArea = false;
}
return;
}