mirror of
https://github.com/libretro/minibrowser.git
synced 2024-11-22 23:19:40 +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
|
||||
QWidget *w = qApp->widgetAt(m_mousePos);
|
||||
|
||||
if(w)
|
||||
if(w) {
|
||||
w->setFocus();
|
||||
widget = w;
|
||||
}
|
||||
}
|
||||
|
||||
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