[Webkit-unassigned] [Bug 35255] [Qt] DRT: Send double click event from EventSender
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Feb 23 13:28:43 PST 2010
https://bugs.webkit.org/show_bug.cgi?id=35255
--- Comment #4 from Kenneth Rohde Christiansen <kenneth at webkit.org> 2010-02-23 13:28:43 PST ---
(From update of attachment 49319)
> + // only consider a click to count, a event which was sent from the
> + // same previous button and from the same position
> + if (m_currentButton == button && m_mousePos == m_clickPos)
> + m_clickCount++;
> + else
> + m_clickCount = 1;
Is time difference not supposed to be considered as well? Doesn't Qt already
handle this?
> + QMouseEvent* event;
> + if (m_clickCount == 2) {
> + event = new QMouseEvent(QEvent::MouseButtonDblClick, m_mousePos,
> + m_mousePos, mouseButton, m_mouseButtons,
> + Qt::NoModifier);
> + } else {
> + event = new QMouseEvent(QEvent::MouseButtonPress, m_mousePos,
> + m_mousePos, mouseButton, m_mouseButtons,
> + Qt::NoModifier);
event = new QMouseEvent((m_clickCount == 2) ? QEvent::MouseButtonDblClick :
QEvent::MouseButtonPress,
m_mousePos, m_mousePos, mouseButton, m_mouseButtons,
Qt::NoModifier);
seems simpler
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list