From 8fd9ad6c82ae4a7017a83fec529b80a0fb21480f Mon Sep 17 00:00:00 2001 From: makuukka Date: Fri, 29 May 2009 10:40:28 +0300 Subject: Missing double click handling added to mouse handling, so that latter release event is not missed. Reviewed-by: Janne Koskinen --- src/gui/kernel/qapplication_s60.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp index b4658da..308bdbb 100644 --- a/src/gui/kernel/qapplication_s60.cpp +++ b/src/gui/kernel/qapplication_s60.cpp @@ -204,7 +204,7 @@ static void mapS60MouseEventTypeToQt(QEvent::Type *type, Qt::MouseButton *button *type = QEvent::MouseButtonDblClick; } - if (*type == QEvent::MouseButtonPress) + if (*type == QEvent::MouseButtonPress || *type == QEvent::MouseButtonDblClick) QApplicationPrivate::mouse_buttons = QApplicationPrivate::mouse_buttons | (*button); else if (*type == QEvent::MouseButtonRelease) QApplicationPrivate::mouse_buttons = QApplicationPrivate::mouse_buttons &(~(*button)); @@ -313,7 +313,7 @@ void QSymbianControl::HandleLongTapEventL( const TPoint& aPenEventLocation, cons QMouseEvent mEvent(QEvent::MouseButtonPress, alienWidget->mapFrom(qwidget, widgetPos), globalPos, Qt::RightButton, QApplicationPrivate::mouse_buttons, Qt::NoModifier); sendMouseEvent(alienWidget, &mEvent); - m_previousEventLongTap = true; + m_previousEventLongTap = false; } void QSymbianControl::HandlePointerEventL(const TPointerEvent& pEvent) @@ -342,7 +342,7 @@ void QSymbianControl::HandlePointerEventL(const TPointerEvent& pEvent) TPoint controlScreenPos = PositionRelativeToScreen(); QPoint globalPos = QPoint(controlScreenPos.iX, controlScreenPos.iY) + widgetPos; - if (type == QEvent::MouseButtonPress) + if (type == QEvent::MouseButtonPress || type == QEvent::MouseButtonDblClick) { // get the button press target alienWidget = qwidget->childAt(widgetPos); @@ -362,7 +362,7 @@ void QSymbianControl::HandlePointerEventL(const TPointerEvent& pEvent) alienWidget = S60->mousePressTarget; if (alienWidget != S60->lastPointerEventTarget) - if (type == QEvent::MouseButtonPress || type == QEvent::MouseMove) + if (type == QEvent::MouseButtonPress || QEvent::MouseButtonDblClick || type == QEvent::MouseMove) { //moved to another widget, create enter and leave events if (S60->lastPointerEventTarget) -- cgit v0.12