/** * Sets the DPMS state of the display. * @param enabled @c 0 to disable DPMS characteristics of the server, enable it otherwise. * @ingroup Ecore_X_DPMS_Group */ EAPI void ecore_x_dpms_enabled_set(int enabled) { LOGFN(__FILE__, __LINE__, __FUNCTION__); CHECK_XCB_CONN; if (!_dpms_avail) return; #ifdef ECORE_XCB_DPMS if (enabled) xcb_dpms_enable(_ecore_xcb_conn); else xcb_dpms_disable(_ecore_xcb_conn); #endif }
void dpms_turn_off_screen(xcb_connection_t *conn) { xcb_dpms_enable(conn); xcb_dpms_force_level(conn, XCB_DPMS_DPMS_MODE_OFF); xcb_flush(conn); }