Esempio n. 1
0
Watcher::Watcher() : QTimer()
{
    connection = xcb_connect (NULL, NULL);
    screen = xcb_setup_roots_iterator (xcb_get_setup (connection)).data;
    xcb_dpms_disable (connection);

    connect(this, SIGNAL(timeout()), this, SLOT(onTimeout()));
    setInterval(1000);
    start();
}
Esempio n. 2
0
/**
 * 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
}