/** * Initialize Ecore_X with proper display */ void _eg_init() { int screens, i; char *dispstr, *subdisp; char newdisp[128]; screens = ScreenCount(ecore_x_display_get()); 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); } }