UI: force to bring the allow/deny pop-up to the front

This solves an issue where the pop-up was only displayed on the same
screen/desktop/workspace where the main window was.
This commit is contained in:
Gustavo Iñiguez Goia 2020-06-25 18:52:29 +02:00
parent de00e89302
commit 0d80af45c2

View file

@ -34,7 +34,7 @@ class PromptDialog(QtWidgets.QDialog, uic.loadUiType(DIALOG_UI_PATH)[0]):
def __init__(self, parent=None):
QtWidgets.QDialog.__init__(self, parent, QtCore.Qt.WindowStaysOnTopHint)
# Other interesting flags: QtCore.Qt.Tool | QtCore.Qt.BypassWindowManagerHint
self._cfg = Config.get()
self.setupUi(self)
@ -78,6 +78,7 @@ class PromptDialog(QtWidgets.QDialog, uic.loadUiType(DIALOG_UI_PATH)[0]):
def showEvent(self, event):
super(PromptDialog, self).showEvent(event)
self.resize(540, 300)
self.activateWindow()
def _checkbox_toggled(self, state):
self.applyButton.setText("%s" % self._apply_text)