Example #1
0
/*
 * Poll the driver for changed information
 */
Bool
RRGetInfo (ScreenPtr pScreen)
{
    rrScrPriv (pScreen);
    Rotation	    rotations;
    int		    i;

    for (i = 0; i < pScrPriv->numOutputs; i++)
	pScrPriv->outputs[i]->changed = FALSE;
    for (i = 0; i < pScrPriv->numCrtcs; i++)
	pScrPriv->crtcs[i]->changed = FALSE;
    
    rotations = 0;
    pScrPriv->changed = FALSE;
    pScrPriv->configChanged = FALSE;
    
    if (!(*pScrPriv->rrGetInfo) (pScreen, &rotations))
	return FALSE;

#if RANDR_10_INTERFACE
    if (pScrPriv->nSizes)
	RRScanOldConfig (pScreen, rotations);
#endif
    RRTellChanged (pScreen);
    return TRUE;
}
Example #2
0
/*
 * Poll the driver for changed information
 */
Bool
RRGetInfo(ScreenPtr pScreen, Bool force_query)
{
    rrScrPriv(pScreen);
    Rotation rotations;
    int i;

    /* Return immediately if we don't need to re-query and we already have the
     * information.
     */
    if (!force_query) {
        if (pScrPriv->numCrtcs != 0 || pScrPriv->numOutputs != 0)
            return TRUE;
    }

    for (i = 0; i < pScrPriv->numOutputs; i++)
        pScrPriv->outputs[i]->changed = FALSE;
    for (i = 0; i < pScrPriv->numCrtcs; i++)
        pScrPriv->crtcs[i]->changed = FALSE;

    rotations = 0;
    pScrPriv->changed = FALSE;
    pScrPriv->configChanged = FALSE;

    if (!(*pScrPriv->rrGetInfo) (pScreen, &rotations))
        return FALSE;

#if RANDR_10_INTERFACE
    if (pScrPriv->nSizes)
        RRScanOldConfig(pScreen, rotations);
#endif
    RRTellChanged(pScreen);
    return TRUE;
}