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

validatedrawable ( Drawable  d,
unsigned int *  w,
unsigned int *  h 
)

Validates if a drawable exists.

Tries to get geometry for the drawable. The drawable is valid if no XError is generated.

Parameters:
d Resource ID used for drawable validation
w Return the drawable's width
h Return the drawable's height
Returns:
True if drawable is valid, otherwise false

Definition at line 213 of file Waimea.cc.

Referenced by validateclient_mapped().

                                                                    {
    int ret, _d;
    unsigned int _ud;
    Window _wd;
    
    XSync(waimea->display, false);
    errors = 0;
    hush = 1;
    if (w == NULL)
        XGetGeometry(waimea->display, d, &_wd, &_d, &_d, &_ud, &_ud, &_ud,
                     &_ud);
    else
        XGetGeometry(waimea->display, d, &_wd, &_d, &_d, w, h, &_ud, &_ud);
    XSync(waimea->display, false);
    hush = 0;
    ret = ( errors == 0 );
    errors = 0;
    return ret;
}


Generated by  Doxygen 1.6.0   Back to index