2 #include <X11/extensions/Xinerama.h>
7 Display
*dpy
= XOpenDisplay(NULL
);
8 int xinerama_event_base
;
9 int xinerama_error_base
;
10 bool xinerama_ready
= XineramaQueryExtension(dpy
,&xinerama_event_base
, &xinerama_error_base
);
12 fprintf(stdout
, "Basic Xinerama screen information - for all the details run 'xdpyinfo -ext XINERAMA'\n");
15 fprintf(stderr
, "No Xinerama support detected, mod_xinerama won't do anything.");
18 XineramaScreenInfo
* sInfo
= XineramaQueryScreens(dpy
, &nRects
);
19 for(i
= 0 ; i
< nRects
; ++i
) {
20 fprintf(stdout
, "Screen %d: %dx%d+%d+%d\n", i
, sInfo
[i
].width
, sInfo
[i
].height
, sInfo
[i
].x_org
, sInfo
[i
].y_org
);