/* call-seq:
 *   window.setActive( activate )       -> true or false
 *
 * Activate or deactivate the window as the current target for OpenGL rendering.
 *
 * A window is active only on the current thread, if you want to make it active on another thread you have to 
 * deactivate it on the previous thread first if it was active. Only one window can be active on a thread at a time, 
 * thus the window previously active (if any) automatically gets deactivated.
 */
static VALUE Window_SetActive( VALUE self, VALUE anActiveFlag )
{
        sf::Window *object = NULL;
        Data_Get_Struct( self, sf::Window, object );
        if( anActiveFlag == Qfalse )
        {
                object->SetActive( false );
        }
        else if( anActiveFlag == Qtrue )
        {
                object->SetActive( true );
        }
        else
        {
                rb_raise( rb_eTypeError, "Expected true or false" );
        }
        return Qnil;
}