* On X, use xauthority * On Wl, use xdg_runtime_dir * Otherwise, use NULL (unneeded with drm plugin) */
| 25 | * Otherwise, use NULL (unneeded with drm plugin) |
| 26 | */ |
| 27 | const char *fetch_env() { |
| 28 | const char *xauth = getenv("XAUTHORITY"); |
| 29 | if (!is_string_empty(xauth)) { |
| 30 | return xauth; |
| 31 | } |
| 32 | return getenv("XDG_RUNTIME_DIR"); |
| 33 | } |
| 34 | |
| 35 | /* |
| 36 | * Only used by gamma and dpms -> in case our display is empty, |
no test coverage detected