Logo Search packages:      
Sourcecode: basket version File versions  Download package

void Container::setActive ( bool  active = true  )  [slot]

User actions

Definition at line 2173 of file container.cpp.

{
#if KDE_IS_VERSION( 3, 2, 90 )   // KDE 3.3.x
      if (active) {
            kapp->updateUserTimestamp(); // If "activate on mouse hovering systray", or "on drag throught systray"
            Global::tray->setActive();   //  FIXME: add this in the places it need
      } else
            Global::tray->setInactive();
#elif KDE_IS_VERSION( 3, 1, 90 ) // KDE 3.2.x
      // Code from Kopete (that seem to work, in waiting KSystemTray make puplic the toggleSHown) :
      if (active) {
            show();
            //raise() and show() should normaly deIconify the window. but it doesn't do here due
            // to a bug in QT or in KDE  (qt3.1.x or KDE 3.1.x) then, i have to call KWin's method
            if (isMinimized())
                  KWin::deIconifyWindow(winId());

            if ( ! KWin::windowInfo(winId(), NET::WMDesktop).onAllDesktops() )
                  KWin::setOnDesktop(winId(), KWin::currentDesktop());
            raise();
            // Code from me: expected and correct behavviour:
            kapp->updateUserTimestamp(); // If "activate on mouse hovering systray", or "on drag throught systray"
            KWin::activateWindow(winId());
      } else
            hide();
#else                            // KDE 3.1.x and lower
      if (active) {
            if (isMinimized())
                  hide();        // If minimized, show() doesn't work !
            show();            // Show it
            showNormal();      // If it was minimized
            raise();           // Raise it on top
            setActiveWindow(); // And set it the active window
      } else
            hide();
#endif
}


Generated by  Doxygen 1.6.0   Back to index