Restore correct window visibility after decoration config change

This commit is contained in:
rien333 2018-03-23 15:19:37 +01:00
parent e2250d65e9
commit 880b33fff5

View File

@ -500,11 +500,13 @@ class MainWindow(QWidget):
def _set_decoration(self, hidden):
""" Set the visibility of the window decoration via Qt."""
window_flags = Qt.Window
refresh_window = self.isVisible()
if hidden:
window_flags |= Qt.CustomizeWindowHint | Qt.NoDropShadowWindowHint
self.setWindowFlags(window_flags)
self.hide()
self.show()
if refresh_window:
self.hide()
self.show()
@pyqtSlot(bool)
def _on_fullscreen_requested(self, on):