diff options
-rw-r--r-- | src/gui/kernel/qguiapplication.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp index a1d5a6e737..2df5933879 100644 --- a/src/gui/kernel/qguiapplication.cpp +++ b/src/gui/kernel/qguiapplication.cpp @@ -2110,6 +2110,13 @@ void QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::Mo processMouseEvent(e); // the original mouse event return; } + if (mouseMove && !positionChanged) { + // On Windows, and possibly other platforms, a touchpad can send a mouse move + // that does not change position, between a press and a release. This may + // confuse applications, so we always filter out these mouse events for + // consistent behavior among platforms. + return; + } } else { Qt::MouseButtons stateChange = e->buttons ^ mouse_buttons; if (positionChanged && (stateChange != Qt::NoButton)) { |