Bug 560950 - Second press event on doubleclick is not dispatched on Qt. r=dougt

This commit is contained in:
Ben Stover 2010-04-21 15:54:25 -07:00
parent e3c85bbb77
commit 76f698c378
3 changed files with 5 additions and 3 deletions

View File

@ -118,7 +118,9 @@ void MozQWidget::keyReleaseEvent(QKeyEvent* aEvent)
void MozQWidget::mouseDoubleClickEvent(QGraphicsSceneMouseEvent* aEvent)
{
mReceiver->mouseDoubleClickEvent(aEvent);
// Qt sends double click event, but not second press event.
mReceiver->OnButtonPressEvent(aEvent);
mReceiver->OnMouseDoubleClickEvent(aEvent);
}
void MozQWidget::mouseMoveEvent(QGraphicsSceneMouseEvent* aEvent)

View File

@ -1328,7 +1328,7 @@ nsWindow::OnButtonReleaseEvent(QGraphicsSceneMouseEvent *aEvent)
}
nsEventStatus
nsWindow::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *aEvent)
nsWindow::OnMouseDoubleClickEvent(QGraphicsSceneMouseEvent *aEvent)
{
PRUint32 eventType;

View File

@ -256,7 +256,7 @@ protected:
virtual nsEventStatus OnMotionNotifyEvent(QGraphicsSceneMouseEvent *);
virtual nsEventStatus OnButtonPressEvent(QGraphicsSceneMouseEvent *);
virtual nsEventStatus OnButtonReleaseEvent(QGraphicsSceneMouseEvent *);
virtual nsEventStatus mouseDoubleClickEvent(QGraphicsSceneMouseEvent *);
virtual nsEventStatus OnMouseDoubleClickEvent(QGraphicsSceneMouseEvent *);
virtual nsEventStatus OnFocusInEvent(QEvent *);
virtual nsEventStatus OnFocusOutEvent(QEvent *);
virtual nsEventStatus OnKeyPressEvent(QKeyEvent *);