mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 18:56:34 +01:00
Merge branch 'Falkon/3.0'
This commit is contained in:
commit
a5ba6df966
@ -1274,13 +1274,17 @@ bool WebView::eventFilter(QObject *obj, QEvent *event)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Hack to find widget that receives input events
|
// Hack to find widget that receives input events
|
||||||
if (obj == this && event->type() == QEvent::ChildAdded && !m_rwhvqt && focusProxy()) {
|
if (obj == this && event->type() == QEvent::ChildAdded) {
|
||||||
|
QTimer::singleShot(0, this, [this]() {
|
||||||
|
if (focusProxy() && m_rwhvqt != focusProxy()) {
|
||||||
m_rwhvqt = focusProxy();
|
m_rwhvqt = focusProxy();
|
||||||
m_rwhvqt->installEventFilter(this);
|
m_rwhvqt->installEventFilter(this);
|
||||||
if (QQuickWidget *w = qobject_cast<QQuickWidget*>(m_rwhvqt)) {
|
if (QQuickWidget *w = qobject_cast<QQuickWidget*>(m_rwhvqt)) {
|
||||||
w->setClearColor(palette().color(QPalette::Window));
|
w->setClearColor(palette().color(QPalette::Window));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// Forward events to WebView
|
// Forward events to WebView
|
||||||
#define HANDLE_EVENT(f, t) \
|
#define HANDLE_EVENT(f, t) \
|
||||||
|
Loading…
Reference in New Issue
Block a user