Only consider visible render widgets for lost focusProxy

Otherwise, when commenting out the focusProxy way above, and using "foo !npm"
with DuckDuckGo, we get two children (one visible, one invisible).
This commit is contained in:
Florian Bruhin 2018-06-11 14:00:02 +02:00
parent 49b6a512c2
commit b63e06561d

View File

@ -74,7 +74,11 @@ class WebEngineView(QWebEngineView):
# This should only find the RenderWidgetHostViewQtDelegateWidget,
# but not e.g. a QMenu
children = self.findChildren(QQuickWidget)
children = [c for c in self.findChildren(QQuickWidget)
if c.isVisible()]
log.webview.debug("Found possibly lost focusProxy: {}"
.format(children))
if not children:
return None