All pastes #835306 Raw Edit

Untitled

public c v1 · immutable
#835306 ·published 2007-12-28 20:26 UTC
rendered paste body
/** * Initialize Ecore_X with proper display */void _eg_init(){  Ecore_X_Window *roots;  int screens, i;  char *dispstr, *subdisp;  char newdisp[255];  roots = ecore_x_window_root_list(&screens);  dispstr = DisplayString(ecore_x_display_get());  subdisp = strdup(dispstr);  for (i = 0; i < screens; i++)   {    dispstr = strchr(subdisp, ':');    if (dispstr)     {      dispstr = strchr(dispstr, '.');      if (NULL != dispstr)        *dispstr = '\0';    }    snprintf(newdisp, sizeof(newdisp), "%s.%d", subdisp, i);    ecore_x_init(newdisp);  }}