From beac7a8ce70acb17c320580538510761dff3ac93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Touceda?= Date: Thu, 24 Jul 2014 16:33:25 -0300 Subject: Improve hide and show main window on Ubuntu --- changes/bug_show_hide_improved | 1 + src/leap/bitmask/gui/mainwindow.py | 6 ++++++ 2 files changed, 7 insertions(+) create mode 100644 changes/bug_show_hide_improved diff --git a/changes/bug_show_hide_improved b/changes/bug_show_hide_improved new file mode 100644 index 00000000..39472074 --- /dev/null +++ b/changes/bug_show_hide_improved @@ -0,0 +1 @@ +- Improve Hide and Show Window behavior on Ubuntu. Fixes #5511. \ No newline at end of file diff --git a/src/leap/bitmask/gui/mainwindow.py b/src/leap/bitmask/gui/mainwindow.py index ff19e17f..383f97bb 100644 --- a/src/leap/bitmask/gui/mainwindow.py +++ b/src/leap/bitmask/gui/mainwindow.py @@ -999,6 +999,12 @@ class MainWindow(QtGui.QMainWindow): if not visible: QtGui.QApplication.setQuitOnLastWindowClosed(True) self.show() + if IS_LINUX: + # On ubuntu, activateWindow doesn't work reliably, so + # we do the following as a workaround. See + # https://bugreports.qt-project.org/browse/QTBUG-24932 + # for more details + QtGui.QX11Info.setAppUserTime(0) self.activateWindow() self.raise_() else: -- cgit v1.2.3