… | |
… | |
462 | #endif |
462 | #endif |
463 | |
463 | |
464 | int fd = XConnectionNumber (dpy); |
464 | int fd = XConnectionNumber (dpy); |
465 | |
465 | |
466 | // try to detect wether we have a local connection. |
466 | // try to detect wether we have a local connection. |
467 | // assume unix domains socket == local, everything else not |
467 | // assume unix domain socket == local, everything else not |
468 | // TODO: might want to check for inet/127.0.0.1 |
468 | // TODO: might want to check for inet/127.0.0.1 |
469 | is_local = 0; |
469 | is_local = 0; |
470 | sockaddr_un sa; |
470 | sockaddr_un sa; |
471 | socklen_t sl = sizeof (sa); |
471 | socklen_t sl = sizeof (sa); |
472 | |
472 | |