Merge remote-tracking branch 'origin/pr/4072'

This commit is contained in:
Florian Bruhin 2018-07-24 16:03:54 +02:00
commit 90d7ab84b0

View File

@ -24,7 +24,8 @@ import base64
import itertools
import functools
from PyQt5.QtCore import pyqtSlot, QRect, QPoint, QTimer, Qt
from PyQt5.QtCore import (pyqtSlot, QRect, QPoint, QTimer, Qt,
QCoreApplication, QEventLoop)
from PyQt5.QtWidgets import QWidget, QVBoxLayout, QApplication, QSizePolicy
from qutebrowser.commands import runners, cmdutils
@ -98,6 +99,8 @@ def raise_window(window, alert=True):
window.setWindowState(window.windowState() & ~Qt.WindowMinimized)
window.setWindowState(window.windowState() | Qt.WindowActive)
window.raise_()
QCoreApplication.processEvents(
QEventLoop.ExcludeUserInputEvents | QEventLoop.ExcludeSocketNotifiers)
window.activateWindow()
if alert: