… | |
… | |
466 | blank_cursor = XCreateGlyphCursor (dpy, f, f, ' ', ' ', |
466 | blank_cursor = XCreateGlyphCursor (dpy, f, f, ' ', ' ', |
467 | &blackcolour, &blackcolour); |
467 | &blackcolour, &blackcolour); |
468 | XUnloadFont (dpy, f); |
468 | XUnloadFont (dpy, f); |
469 | #endif |
469 | #endif |
470 | |
470 | |
|
|
471 | flags = 0; |
|
|
472 | #if XRENDER |
|
|
473 | int major, minor; |
|
|
474 | if (XRenderQueryVersion (dpy, &major, &minor)) |
|
|
475 | { |
|
|
476 | flags |= DISPLAY_HAS_RENDER; |
|
|
477 | |
|
|
478 | if (major > 0 || (major == 0 && minor >= 11)) |
|
|
479 | flags |= DISPLAY_HAS_RENDER_MUL; |
|
|
480 | |
|
|
481 | XFilters *filters = XRenderQueryFilters (dpy, root); |
|
|
482 | if (filters) |
|
|
483 | { |
|
|
484 | for (int i = 0; i < filters->nfilter; i++) |
|
|
485 | if (!strcmp (filters->filter[i], FilterConvolution)) |
|
|
486 | flags |= DISPLAY_HAS_RENDER_CONV; |
|
|
487 | |
|
|
488 | XFree (filters); |
|
|
489 | } |
|
|
490 | } |
|
|
491 | #endif |
|
|
492 | |
471 | int fd = XConnectionNumber (dpy); |
493 | int fd = XConnectionNumber (dpy); |
472 | |
494 | |
473 | // try to detect whether we have a local connection. |
495 | // try to detect whether we have a local connection. |
474 | // assume unix domain socket == local, everything else not |
496 | // assume unix domain socket == local, everything else not |
475 | // TODO: might want to check for inet/127.0.0.1 |
497 | // TODO: might want to check for inet/127.0.0.1 |