Merge remote-tracking branch 'origin/pr/3432'
This commit is contained in:
commit
6b9edefb05
@ -1644,6 +1644,8 @@ class CommandDispatcher:
|
|||||||
except webelem.Error as e:
|
except webelem.Error as e:
|
||||||
raise cmdexc.CommandError(str(e))
|
raise cmdexc.CommandError(str(e))
|
||||||
|
|
||||||
|
mainwindow.raise_window(objreg.last_focused_window(), alert=False)
|
||||||
|
|
||||||
@cmdutils.register(instance='command-dispatcher', maxsplit=0,
|
@cmdutils.register(instance='command-dispatcher', maxsplit=0,
|
||||||
scope='window')
|
scope='window')
|
||||||
def insert_text(self, text):
|
def insert_text(self, text):
|
||||||
|
@ -94,13 +94,15 @@ def get_window(via_ipc, force_window=False, force_tab=False,
|
|||||||
return window.win_id
|
return window.win_id
|
||||||
|
|
||||||
|
|
||||||
def raise_window(window):
|
def raise_window(window, alert=True):
|
||||||
"""Raise the given MainWindow object."""
|
"""Raise the given MainWindow object."""
|
||||||
window.setWindowState(window.windowState() & ~Qt.WindowMinimized)
|
window.setWindowState(window.windowState() & ~Qt.WindowMinimized)
|
||||||
window.setWindowState(window.windowState() | Qt.WindowActive)
|
window.setWindowState(window.windowState() | Qt.WindowActive)
|
||||||
window.raise_()
|
window.raise_()
|
||||||
window.activateWindow()
|
window.activateWindow()
|
||||||
QApplication.instance().alert(window)
|
|
||||||
|
if alert:
|
||||||
|
QApplication.instance().alert(window)
|
||||||
|
|
||||||
|
|
||||||
# WORKAROUND for https://github.com/PyCQA/pylint/issues/1770
|
# WORKAROUND for https://github.com/PyCQA/pylint/issues/1770
|
||||||
|
Loading…
Reference in New Issue
Block a user