#include "Xrandrint.h"
#define OutputInfoExtra (SIZEOF(xRRGetOutputInfoReply) - 32)
-
+
XRROutputInfo *
XRRGetOutputInfo (Display *dpy, XRRScreenResources *resources, RROutput output)
{
rep.nClones * 4 +
((rep.nameLength + 3) & ~3));
- /*
- * first we must compute how much space to allocate for
+ /*
+ * first we must compute how much space to allocate for
* randr library's use; we'll allocate the structures in a single
* allocation, on cleanlyness grounds.
*/
_XRead32 (dpy, xoi->crtcs, rep.nCrtcs << 2);
_XRead32 (dpy, xoi->modes, rep.nModes << 2);
_XRead32 (dpy, xoi->clones, rep.nClones << 2);
-
+
/*
* Read name and '\0' terminate
*/
_XReadPad (dpy, xoi->name, rep.nameLength);
xoi->name[rep.nameLength] = '\0';
-
+ xoi->nameLen = rep.nameLength;
+
/*
* Skip any extra data
*/
if (nbytes > nbytesRead)
_XEatData (dpy, (unsigned long) (nbytes - nbytesRead));
-
+
UnlockDisplay (dpy);
SyncHandle ();
return (XRROutputInfo *) xoi;
RRSimpleCheckExtension (dpy, info);
- if (!XRRQueryVersion (dpy, &major_version, &minor_version) ||
+ if (!XRRQueryVersion (dpy, &major_version, &minor_version) ||
!_XRRHasOutputPrimary (major_version, minor_version))
return;
RRCheckExtension (dpy, info, 0);
- if (!XRRQueryVersion (dpy, &major_version, &minor_version) ||
+ if (!XRRQueryVersion (dpy, &major_version, &minor_version) ||
!_XRRHasOutputPrimary (major_version, minor_version))
return None;
if (!_XReply (dpy, (xReply *) &rep, 0, xFalse))
rep.output = None;
-
+
UnlockDisplay(dpy);
SyncHandle();