diff options
author | Florian Bruhin <me@the-compiler.org> | 2022-04-24 18:06:07 +0200 |
---|---|---|
committer | Florian Bruhin <me@the-compiler.org> | 2022-04-24 18:10:10 +0200 |
commit | e2db790593eee8329fe8b168e82043bcbb19cbae (patch) | |
tree | 8d0690d20472bba48e4074c463019e0b6d0b2ee6 /qutebrowser/mainwindow/mainwindow.py | |
parent | 65345eab9572fe2426eb8292aa4ab734c099576f (diff) | |
download | qutebrowser-e2db790593eee8329fe8b168e82043bcbb19cbae.tar.gz qutebrowser-e2db790593eee8329fe8b168e82043bcbb19cbae.zip |
wipnew-stubs
Diffstat (limited to 'qutebrowser/mainwindow/mainwindow.py')
-rw-r--r-- | qutebrowser/mainwindow/mainwindow.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/qutebrowser/mainwindow/mainwindow.py b/qutebrowser/mainwindow/mainwindow.py index 7f62c2dc4..74522a091 100644 --- a/qutebrowser/mainwindow/mainwindow.py +++ b/qutebrowser/mainwindow/mainwindow.py @@ -92,7 +92,7 @@ def raise_window(window, alert=True): window.setWindowState(window.windowState() | Qt.WindowActive) window.raise_() # WORKAROUND for https://bugreports.qt.io/browse/QTBUG-69568 - QCoreApplication.processEvents( # type: ignore[call-overload] + QCoreApplication.processEvents( QEventLoop.ExcludeUserInputEvents | QEventLoop.ExcludeSocketNotifiers) if not sip.isdeleted(window): @@ -561,11 +561,11 @@ class MainWindow(QWidget): def _set_decoration(self, hidden): """Set the visibility of the window decoration via Qt.""" - window_flags: int = Qt.Window + window_flags = cast(Qt.WindowFlags, Qt.Window) refresh_window = self.isVisible() if hidden: window_flags |= Qt.CustomizeWindowHint | Qt.NoDropShadowWindowHint - self.setWindowFlags(cast(Qt.WindowFlags, window_flags)) + self.setWindowFlags(window_flags) if refresh_window: self.show() @@ -574,9 +574,7 @@ class MainWindow(QWidget): if not config.val.content.fullscreen.window: if on: self.state_before_fullscreen = self.windowState() - self.setWindowState( - Qt.WindowFullScreen | # type: ignore[arg-type] - self.state_before_fullscreen) # type: ignore[operator] + self.setWindowState(Qt.WindowFullScreen | self.state_before_fullscreen) elif self.isFullScreen(): self.setWindowState(self.state_before_fullscreen) log.misc.debug('on: {}, state before fullscreen: {}'.format( |