| 496 | |
| 497 | |
| 498 | static void fconfig_setcompressfromdpy(Display *dpy, FakerConfig &fc) |
| 499 | { |
| 500 | if(fc.compress < 0) |
| 501 | { |
| 502 | bool useSunRay = false; |
| 503 | Atom atom = None; |
| 504 | if((atom = XInternAtom(dpy, "_SUN_SUNRAY_SESSION", True)) != None) |
| 505 | useSunRay = true; |
| 506 | const char *dstr = DisplayString(dpy); |
| 507 | if((strlen(dstr) && dstr[0] == ':') || (strlen(dstr) > 5 |
| 508 | && !strnicmp(dstr, "unix", 4))) |
| 509 | { |
| 510 | if(useSunRay) fconfig_setcompress(fc, RRCOMP_XV); |
| 511 | else fconfig_setcompress(fc, RRCOMP_PROXY); |
| 512 | } |
| 513 | else |
| 514 | { |
| 515 | if(useSunRay) fconfig_setcompress(fc, RRCOMP_YUV); |
| 516 | else fconfig_setcompress(fc, RRCOMP_JPEG); |
| 517 | } |
| 518 | } |
| 519 | } |
| 520 | |
| 521 | |
| 522 | void fconfig_setdefaultsfromdpy(Display *dpy) |
no test coverage detected