Add a lost-focusproxy debug flag

This commit is contained in:
Florian Bruhin 2018-06-11 21:27:08 +02:00
parent a6b314ae91
commit c328d54ebe
2 changed files with 5 additions and 4 deletions

View File

@ -66,9 +66,10 @@ class WebEngineView(QWebEngineView):
However, it sometimes isn't, so we use this as a WORKAROUND for
https://bugreports.qt.io/browse/QTBUG-68727
"""
proxy = self.focusProxy()
if proxy is not None:
return proxy
if 'lost-focusproxy' not in objreg.get('args').debug_flags:
proxy = self.focusProxy()
if proxy is not None:
return proxy
# This should only find the RenderWidgetHostViewQtDelegateWidget,
# but not e.g. a QMenu

View File

@ -167,7 +167,7 @@ def debug_flag_error(flag):
log-requests: Log all network requests.
"""
valid_flags = ['debug-exit', 'pdb-postmortem', 'no-sql-history',
'no-scroll-filtering', 'log-requests']
'no-scroll-filtering', 'log-requests', 'lost-focusproxy']
if flag in valid_flags:
return flag