Skip to content

Commit

Permalink
Merge branch 'main' into onJsDialog
Browse files Browse the repository at this point in the history
  • Loading branch information
TrafalgarSX authored Aug 18, 2024
2 parents 02d110c + a13f04e commit a64baac
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
5 changes: 5 additions & 0 deletions include/QCefView.h
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,11 @@ public slots:
/// </summary>
void wheelEvent(QWheelEvent* event) override;

/// <summary>
/// Please refer to QWidget::leaveEvent
/// </summary>
void leaveEvent(QEvent* event) override;

/// <summary>
/// Please refer to QWidget::contextMenuEvent
/// </summary>
Expand Down
12 changes: 12 additions & 0 deletions src/QCefView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,18 @@ QCefView::onRequestCloseFromWeb()
return true;
}

void
QCefView::leaveEvent(QEvent* event)
{
Q_D(QCefView);

QPoint mousePos = QCursor::pos();
QMouseEvent moveEvent(QEvent::MouseMove, mousePos, mousePos, Qt::NoButton, Qt::NoButton, Qt::NoModifier);
d->onViewMouseEvent(&moveEvent);

QWidget::leaveEvent(event);
}

QVariant
QCefView::inputMethodQuery(Qt::InputMethodQuery query) const
{
Expand Down

0 comments on commit a64baac

Please sign in to comment.