All pastes #470631 Raw Edit

Miscellany

public text v1 · immutable
·published 2007-05-04 12:17 UTC
rendered paste body
static void
winrulesUpdateState (CompWindow *w,
                     int optNum,
                     int mask)
{
    unsigned int newState;

    WINRULES_SCREEN (w->screen);
    WINRULES_WINDOW (w);

    if (matchEval (&ws->opt[optNum].value.match, w))
    {
        newState = w->state | mask;
        newState = constrainWindowState (newState, w->actions);
    } else if (ww->setMask & mask) (
        newState = w->state & ~mask;
        ww->setMask &= ~mask;
    }

    if (newState != w->state)
    {
        changeWindowState (w, newState);
        if (mask & (CompWindowStateFullscreenMask |
                    CompWindowStateAboveMask      |
                    CompWindowStateBelowMask       ))
            updateWindowAttributes (w, CompStackingUpdateModeNormal);
        else
            updateWindowAttributes (w, CompStackingUpdateModeNone);
    }
}