mirror of
https://github.com/libretro/minibrowser.git
synced 2024-11-23 07:29:39 +00:00
send unfocused mouse events to the widget under the cursor
This commit is contained in:
parent
e5a0ab93ac
commit
edf2269cc3
@ -147,8 +147,10 @@ void MiniBrowser::onMouseInput(QtMouse mouse) {
|
|||||||
// shift focus to the widget we just clicked on
|
// shift focus to the widget we just clicked on
|
||||||
QWidget *w = qApp->widgetAt(m_mousePos);
|
QWidget *w = qApp->widgetAt(m_mousePos);
|
||||||
|
|
||||||
if(w)
|
if(w) {
|
||||||
w->setFocus();
|
w->setFocus();
|
||||||
|
widget = w;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QMouseEvent *pressEvent = new QMouseEvent(QEvent::MouseButtonPress, widget->mapFromGlobal(mouse.newPos), mouse.newPos, Qt::LeftButton, Qt::LeftButton, Qt::NoModifier);
|
QMouseEvent *pressEvent = new QMouseEvent(QEvent::MouseButtonPress, widget->mapFromGlobal(mouse.newPos), mouse.newPos, Qt::LeftButton, Qt::LeftButton, Qt::NoModifier);
|
||||||
|
Loading…
Reference in New Issue
Block a user