Browse Source

Systray: Force window raise when being re-shown

tags/v0.9.0
falkTX 13 years ago
parent
commit
57275133e7
1 changed files with 8 additions and 1 deletions
  1. +8
    -1
      src/systray.py

+ 8
- 1
src/systray.py View File

@@ -18,7 +18,7 @@

# Imports (Global)
import os, sys
from PyQt4.QtCore import SIGNAL
from PyQt4.QtCore import QTimer, SIGNAL
from PyQt4.QtGui import QAction, QIcon, QMenu, QSystemTrayIcon

try:
@@ -618,14 +618,21 @@ class GlobalSysTray(object):
self._parent.hide()
else:
self.setActionText("show", self._parent.tr("Minimize"))

if self._parent.isMaximized():
self._parent.showMaximized()
else:
self._parent.showNormal()

QTimer.singleShot(100, self.__raiseWindow)

def __quitCall(self):
self._parent.close()

def __raiseWindow(self):
self._parent.activateWindow()
self._parent.raise_()

#--------------- main ------------------
if __name__ == '__main__':
from PyQt4.QtGui import QApplication, QDialog, QMessageBox


Loading…
Cancel
Save