… | |
… | |
490 | |
490 | |
491 | flags = 0; |
491 | flags = 0; |
492 | #if XRENDER |
492 | #if XRENDER |
493 | int major, minor; |
493 | int major, minor; |
494 | if (XRenderQueryVersion (dpy, &major, &minor)) |
494 | if (XRenderQueryVersion (dpy, &major, &minor)) |
495 | { |
|
|
496 | flags |= DISPLAY_HAS_RENDER; |
|
|
497 | |
|
|
498 | if (major > 0 || (major == 0 && minor >= 10)) |
495 | if (major > 0 || (major == 0 && minor >= 10)) |
|
|
496 | { |
499 | flags |= DISPLAY_HAS_RENDER_10; |
497 | flags |= DISPLAY_HAS_RENDER; |
500 | |
498 | |
|
|
499 | #if 0 |
501 | if (major > 0 || (major == 0 && minor >= 11)) |
500 | if (major > 0 || (major == 0 && minor >= 11)) |
502 | flags |= DISPLAY_HAS_RENDER_MUL; |
501 | flags |= DISPLAY_HAS_RENDER_MUL; |
|
|
502 | #endif |
503 | |
503 | |
504 | XFilters *filters = XRenderQueryFilters (dpy, root); |
504 | if (XFilters *filters = XRenderQueryFilters (dpy, root)) |
505 | if (filters) |
|
|
506 | { |
505 | { |
507 | for (int i = 0; i < filters->nfilter; i++) |
506 | for (int i = 0; i < filters->nfilter; i++) |
508 | if (!strcmp (filters->filter[i], FilterConvolution)) |
507 | if (!strcmp (filters->filter [i], FilterConvolution)) |
509 | flags |= DISPLAY_HAS_RENDER_CONV; |
508 | flags |= DISPLAY_HAS_RENDER_CONV; |
510 | |
509 | |
511 | XFree (filters); |
510 | XFree (filters); |
512 | } |
511 | } |
513 | } |
512 | } |
514 | #endif |
513 | #endif |
515 | |
514 | |
516 | int fd = XConnectionNumber (dpy); |
515 | int fd = XConnectionNumber (dpy); |
517 | |
516 | |
518 | // try to detect whether we have a local connection. |
517 | // try to detect whether we have a local connection. |