#include #include int main() { Display *dpy; XRRScreenResources *resources; XRROutputInfo *info; dpy = XOpenDisplay (NULL); resources = XRRGetScreenResources (dpy, DefaultRootWindow (dpy)); info = XRRGetOutputInfo (dpy, resources, resources->outputs[0]); printf ("%d\n", info->npreferred); XRRFreeOutputInfo (info); XRRFreeScreenResources (resources); return 0; }