Bug 78458
| Summary: | [Qt] QWebPagePrivate::leaveEvent(QEvent*) implement error | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | carwin <clcarwin> |
| Component: | UI Events | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED INVALID | ||
| Severity: | Normal | CC: | andersca, clcarwin |
| Priority: | P2 | Keywords: | Qt |
| Version: | 528+ (Nightly build) | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
carwin
Original source:
//source
QMouseEvent fakeEvent(QEvent::MouseMove, QCursor::pos(), Qt::NoButton, Qt::NoButton, Qt::NoModifier);
QCursor::pos() is in the screen coordinate system. We'd better change to:
//source
QMouseEvent fakeEvent(QEvent::MouseMove, this->view.value->mapFromGlobal(QCursor::pos()), Qt::NoButton, Qt::NoButton, Qt::NoModifier);
This is not the best modify method. Some times leaveEvent happen, but mouse's pos is still in webpage, such as lost focus. So I suggest modify to make sure mouse move outside of the widget:
//source
QMouseEvent fakeEvent(QEvent::MouseMove, QPoint(-1,-1), Qt::NoButton, Qt::NoButton, Qt::NoModifier);
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |