Exemple #1
0
 def toggleHideRestore(self):
     '''Show or hide the window based on some parameters. We can detect
     when we are obscured and come to the top. In other cases we hide if
     mapped and show if not.
     '''
     if KDE:
         if KWindowSystem.activeWindow() == self.winId() and self.isVisible():
             self.hide()
         else:
             self.show()
             KWindowSystem.forceActiveWindow(self.winId())
     else:
         if self.isVisible():
             self.hide()
         else: self.show()
Exemple #2
0
 def toggleHideRestore(self):
     '''Show or hide the window based on some parameters. We can detect
     when we are obscured and come to the top. In other cases we hide if
     mapped and show if not.
     '''
     if KDE:
         if KWindowSystem.activeWindow() == self.winId() and self.isVisible(
         ):
             self.hide()
         else:
             self.show()
             KWindowSystem.forceActiveWindow(self.winId())
     else:
         if self.isVisible():
             self.hide()
         else:
             self.show()