From a634bbc67699f044d22b6d450f22234397a6715f Mon Sep 17 00:00:00 2001 From: Romain Pokrzywka Date: Fri, 20 Jul 2012 15:36:10 -0700 Subject: Fix duplicate mouse event being sent for LinuxInput touch events This is due to the X and Y messages being received before the TOUCH one, followed by a SYNC message which then creates the second mouseEvent. The event should actually be sent on the SYNC message, so remove the one sent from the TOUCH message handler, just set the posChanged flag. For more details see: http://www.kernel.org/doc/Documentation/input/event-codes.txt Change-Id: I30e71fc3e7da24d8e698467b4d6e0bcd5a64eb37 Reviewed-by: Paul Olav Tvete Reviewed-by: Girish Ramakrishnan --- src/plugins/generic/linuxinput/qlinuxinput.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/generic/linuxinput/qlinuxinput.cpp b/src/plugins/generic/linuxinput/qlinuxinput.cpp index 4e9f6e8..6bb3532 100644 --- a/src/plugins/generic/linuxinput/qlinuxinput.cpp +++ b/src/plugins/generic/linuxinput/qlinuxinput.cpp @@ -273,7 +273,7 @@ void QLinuxInputMouseHandler::readMouseData() } else if (data->type == EV_KEY && data->code == BTN_TOUCH) { m_buttons = data->value ? Qt::LeftButton : Qt::NoButton; - sendMouseEvent(m_x, m_y, m_buttons); + posChanged = true; pendingMouseEvent = false; } else if (data->type == EV_KEY && data->code >= BTN_LEFT && data->code <= BTN_MIDDLE) { Qt::MouseButton button = Qt::NoButton; -- cgit v0.12