Exemple #1
0
/*
 * When we come back to the X server, we need to resume the event driver,
 * and we need to restore the LED settings to what they were when we
 * switched away.
 */
Bool
xf86VTSwitchTo(void)
{
  ev_resume();

  xf86Info.vtRequestsPending = FALSE;
  if (ioctl(xf86Info.consoleFd, VT_RELDISP, VT_ACKACQ) < 0) {
    return(FALSE);
  } else {
    if (sco_ledstatus >= 0) {
      ioctl (xf86Info.consoleFd, KDSETLED, sco_ledstate);
    }
    sco_ledstatus = -1;

    /*
     * Convince the console driver this screen is in graphics mode,
     * otherwise it assumes it can do more to the screen than it should.
     */
    if (ioctl(xf86Info.consoleFd, KDSETMODE, KD_GRAPHICS) < 0) {
        ErrorF("Failed to set graphics mode (%s)\n", strerror(errno));
    }

    return TRUE;
  }
}
Exemple #2
0
/**
 * Resumes the event loop and all timers.
 * 
 * NOTE: DO NOT CALL UNLESS YOU HAVE CALLED EventLoop->suspend() first!
 * 
 * @return boolean  false if object is not initialized
 */
PHP_METHOD(EventLoop, resume)
{
	/* TODO: Implement a check for it suspend has been called? */
	event_loop_object *obj = (event_loop_object *)zend_object_store_get_object(getThis() TSRMLS_CC);
	
	assert(obj->loop);
	
	if(obj->loop)
	{
		ev_resume(obj->loop);
		
		RETURN_BOOL(1);
	}
	
	RETURN_BOOL(0);
}
Exemple #3
0
void Loop::resume()
{
    if (S_LIKELY(_loop != nullptr)) {
        ev_resume(_loop);
    }
}
Exemple #4
0
static PyObject *
Loop_resume(Loop *self)
{
    ev_resume(self->loop);
    Py_RETURN_NONE;
}