parent
e81edc8224
commit
5ccafd62d4
@ -19,12 +19,14 @@
|
|||||||
|
|
||||||
"""Misc. widgets used at different places."""
|
"""Misc. widgets used at different places."""
|
||||||
|
|
||||||
|
import operator
|
||||||
|
|
||||||
from PyQt5.QtCore import pyqtSlot, pyqtSignal, Qt, QSize, QTimer
|
from PyQt5.QtCore import pyqtSlot, pyqtSignal, Qt, QSize, QTimer
|
||||||
from PyQt5.QtWidgets import (QLineEdit, QWidget, QHBoxLayout, QLabel,
|
from PyQt5.QtWidgets import (QLineEdit, QWidget, QHBoxLayout, QLabel,
|
||||||
QStyleOption, QStyle, QLayout, QApplication)
|
QStyleOption, QStyle, QLayout, QApplication)
|
||||||
from PyQt5.QtGui import QValidator, QPainter
|
from PyQt5.QtGui import QValidator, QPainter
|
||||||
|
|
||||||
from qutebrowser.utils import utils, objreg
|
from qutebrowser.utils import utils, objreg, qtutils, log
|
||||||
from qutebrowser.misc import cmdhistory
|
from qutebrowser.misc import cmdhistory
|
||||||
|
|
||||||
|
|
||||||
@ -260,6 +262,15 @@ class WrapperLayout(QLayout):
|
|||||||
self._widget = widget
|
self._widget = widget
|
||||||
container.setFocusProxy(widget)
|
container.setFocusProxy(widget)
|
||||||
widget.setParent(container)
|
widget.setParent(container)
|
||||||
|
if (qtutils.version_check('5.8.0', op=operator.eq) and
|
||||||
|
container.window() and
|
||||||
|
container.window().windowHandle() and
|
||||||
|
not container.window().windowHandle().isActive()):
|
||||||
|
log.misc.debug("Calling QApplication::sync...")
|
||||||
|
# WORKAROUND for:
|
||||||
|
# https://bugreports.qt.io/browse/QTBUG-56652
|
||||||
|
# https://codereview.qt-project.org/#/c/176113/5//ALL,unified
|
||||||
|
QApplication.sync()
|
||||||
|
|
||||||
def unwrap(self):
|
def unwrap(self):
|
||||||
self._widget.setParent(None)
|
self._widget.setParent(None)
|
||||||
|
@ -209,15 +209,22 @@ class QuteProc(testprocess.Process):
|
|||||||
"load status for <qutebrowser.browser.* tab_id=0 "
|
"load status for <qutebrowser.browser.* tab_id=0 "
|
||||||
"url='about:blank'>: LoadStatus.success")
|
"url='about:blank'>: LoadStatus.success")
|
||||||
start_okay_messages_focus = [
|
start_okay_messages_focus = [
|
||||||
# QtWebKit
|
## QtWebKit
|
||||||
"Focus object changed: "
|
"Focus object changed: "
|
||||||
"<qutebrowser.browser.* tab_id=0 url='about:blank'>",
|
"<qutebrowser.browser.* tab_id=0 url='about:blank'>",
|
||||||
# QtWebEngine
|
# when calling QApplication::sync
|
||||||
|
"Focus object changed: "
|
||||||
|
"<qutebrowser.browser.webkit.webview.WebView tab_id=0 url=''>",
|
||||||
|
|
||||||
|
## QtWebEngine
|
||||||
"Focus object changed: "
|
"Focus object changed: "
|
||||||
"<PyQt5.QtWidgets.QOpenGLWidget object at *>",
|
"<PyQt5.QtWidgets.QOpenGLWidget object at *>",
|
||||||
# QtWebEngine with Qt >= 5.8
|
# with Qt >= 5.8
|
||||||
"Focus object changed: "
|
"Focus object changed: "
|
||||||
"<PyQt5.QtGui.QWindow object at *>",
|
"<PyQt5.QtGui.QWindow object at *>",
|
||||||
|
# when calling QApplication::sync
|
||||||
|
"Focus object changed: "
|
||||||
|
"<PyQt5.QtWidgets.QWidget object at *>",
|
||||||
]
|
]
|
||||||
|
|
||||||
if (log_line.category == 'ipc' and
|
if (log_line.category == 'ipc' and
|
||||||
|
Loading…
Reference in New Issue
Block a user