mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 631170 - mouse hover broken in Qt build r=romaxa a=npodb
This commit is contained in:
parent
b7fac673c5
commit
c1825cc564
@ -87,6 +87,7 @@ MozQWidget::MozQWidget(nsWindow* aReceiver, QGraphicsItem* aParent)
|
||||
setFlag(QGraphicsItem::ItemAcceptsInputMethod);
|
||||
setAcceptTouchEvents(true);
|
||||
#endif
|
||||
setAcceptHoverEvents(true);
|
||||
}
|
||||
|
||||
MozQWidget::~MozQWidget()
|
||||
@ -176,7 +177,7 @@ void MozQWidget::hoverLeaveEvent(QGraphicsSceneHoverEvent* aEvent)
|
||||
|
||||
void MozQWidget::hoverMoveEvent(QGraphicsSceneHoverEvent* aEvent)
|
||||
{
|
||||
mReceiver->OnMoveEvent(aEvent);
|
||||
mReceiver->OnMotionNotifyEvent(aEvent->pos(), aEvent->modifiers());
|
||||
}
|
||||
|
||||
void MozQWidget::keyPressEvent(QKeyEvent* aEvent)
|
||||
@ -318,7 +319,7 @@ void MozQWidget::mouseDoubleClickEvent(QGraphicsSceneMouseEvent* aEvent)
|
||||
|
||||
void MozQWidget::mouseMoveEvent(QGraphicsSceneMouseEvent* aEvent)
|
||||
{
|
||||
mReceiver->OnMotionNotifyEvent(aEvent);
|
||||
mReceiver->OnMotionNotifyEvent(aEvent->pos(), aEvent->modifiers());
|
||||
}
|
||||
|
||||
void MozQWidget::mousePressEvent(QGraphicsSceneMouseEvent* aEvent)
|
||||
|
@ -193,6 +193,7 @@ public:
|
||||
, mTopLevelWidget(aTopLevel)
|
||||
{
|
||||
scene()->addItem(aTopLevel);
|
||||
setMouseTracking(true);
|
||||
}
|
||||
|
||||
protected:
|
||||
|
@ -1255,14 +1255,14 @@ define CHECK_MOUSE_BLOCKED {}
|
||||
#endif
|
||||
|
||||
nsEventStatus
|
||||
nsWindow::OnMotionNotifyEvent(QGraphicsSceneMouseEvent *aEvent)
|
||||
nsWindow::OnMotionNotifyEvent(QPointF aPos, Qt::KeyboardModifiers aModifiers)
|
||||
{
|
||||
UserActivity();
|
||||
|
||||
CHECK_MOUSE_BLOCKED
|
||||
|
||||
mMoveEvent.pos = aEvent->pos();
|
||||
mMoveEvent.modifiers = aEvent->modifiers();
|
||||
mMoveEvent.pos = aPos;
|
||||
mMoveEvent.modifiers = aModifiers;
|
||||
mMoveEvent.needDispatch = true;
|
||||
DispatchMotionToMainThread();
|
||||
|
||||
|
@ -271,7 +271,7 @@ protected:
|
||||
virtual nsEventStatus OnCloseEvent(QCloseEvent *);
|
||||
virtual nsEventStatus OnEnterNotifyEvent(QGraphicsSceneHoverEvent *);
|
||||
virtual nsEventStatus OnLeaveNotifyEvent(QGraphicsSceneHoverEvent *);
|
||||
virtual nsEventStatus OnMotionNotifyEvent(QGraphicsSceneMouseEvent *);
|
||||
virtual nsEventStatus OnMotionNotifyEvent(QPointF, Qt::KeyboardModifiers);
|
||||
virtual nsEventStatus OnButtonPressEvent(QGraphicsSceneMouseEvent *);
|
||||
virtual nsEventStatus OnButtonReleaseEvent(QGraphicsSceneMouseEvent *);
|
||||
virtual nsEventStatus OnMouseDoubleClickEvent(QGraphicsSceneMouseEvent *);
|
||||
|
Loading…
Reference in New Issue
Block a user