Explorar el Código

x stuff

master
Martin Dørum hace 3 años
padre
commit
4de545f070
Se han modificado 1 ficheros con 10 adiciones y 0 borrados
  1. 10
    0
      main.c

+ 10
- 0
main.c Ver fichero

@@ -131,7 +131,17 @@ int main(int argc, char **argv) {

freeaddrinfo(info);

// This is useful
if (getenv("DISPLAY") == NULL) {
setenv("DISPLAY", ":0", 1);
}

Display *display = XOpenDisplay(NULL);
if (display == NULL) {
fprintf(stderr, "Failed to open display.\n");
return 1;
}

Window root = XDefaultRootWindow(display);
XWindowAttributes gwa;
XGetWindowAttributes(display, root, &gwa);

Cargando…
Cancelar
Guardar