Exemplo n.º 1
0
void ShowDesktop::slotWindowAdded(WId w)
{
    if (!m_showingDesktop)
    {
        return;
    }

    NETWinInfo inf(QX11Info::display(), w, QX11Info::appRootWindow(),
                   NET::XAWMState | NET::WMWindowType);
    NET::WindowType windowType = inf.windowType(NET::AllTypesMask);

    if ((windowType == NET::Normal || windowType == NET::Unknown) &&
        inf.mappingState() == NET::Visible)
    {
        KConfig _kwincfg( "kwinrc" );
        KConfigGroup kwincfg(&_kwincfg, "Windows" );
        if( kwincfg.readEntry( "ShowDesktopIsMinimizeAll", false ))
        {
            m_iconifiedList.clear();
            m_showingDesktop = false;
            emit desktopShown(false);
        }
        else
        {
            m_activeWindow = w;
            showDesktop(false);
        }
    }
}
Exemplo n.º 2
0
void ShowDesktop::slotWindowAdded(WId w)
{
    if(!m_showingDesktop)
    {
        return;
    }

    NETWinInfo inf(qt_xdisplay(), w, qt_xrootwin(), NET::XAWMState | NET::WMWindowType);
    NET::WindowType windowType = inf.windowType(NET::AllTypesMask);

    if((windowType == NET::Normal || windowType == NET::Unknown) && inf.mappingState() == NET::Visible)
    {
        KConfig kwincfg("kwinrc", true); // see in kwin
        kwincfg.setGroup("Windows");
        if(kwincfg.readBoolEntry("ShowDesktopIsMinimizeAll", false))
        {
            m_iconifiedList.clear();
            m_showingDesktop = false;
            emit desktopShown(false);
        }
        else
        {
            m_activeWindow = w;
            showDesktop(false);
        }
    }
}