summaryrefslogtreecommitdiff
path: root/src/XrrOutput.c
diff options
context:
space:
mode:
authorKeith Packard <keithp@guitar.keithp.com>2006-10-03 21:03:10 -0700
committerKeith Packard <keithp@guitar.keithp.com>2006-10-03 21:03:10 -0700
commitdd0fb435a0168d4041ecd81024d6493295651c61 (patch)
tree2702741708910e7ad682aa7d878c335507004617 /src/XrrOutput.c
parentcb1dbb7c2446ddf514ee709fba940cc4e75438a0 (diff)
Add mode origins and output options.
Diffstat (limited to 'src/XrrOutput.c')
-rw-r--r--src/XrrOutput.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/XrrOutput.c b/src/XrrOutput.c
index 1c93660..872a83a 100644
--- a/src/XrrOutput.c
+++ b/src/XrrOutput.c
@@ -32,6 +32,8 @@
#include <X11/extensions/Xrender.h>
#include "Xrandrint.h"
+#define OutputInfoExtra (SIZEOF(xRRGetOutputInfoReply) - 32)
+
XRROutputInfo *
XRRGetOutputInfo (Display *dpy, XRRScreenResources *resources, RROutput output)
{
@@ -52,14 +54,14 @@ XRRGetOutputInfo (Display *dpy, XRRScreenResources *resources, RROutput output)
req->output = output;
req->configTimestamp = resources->configTimestamp;
- if (!_XReply (dpy, (xReply *) &rep, 0, xFalse))
+ if (!_XReply (dpy, (xReply *) &rep, OutputInfoExtra >> 2, xFalse))
{
UnlockDisplay (dpy);
SyncHandle ();
return NULL;
}
- nbytes = (long) rep.length << 2;
+ nbytes = ((long) (rep.length) << 2) - OutputInfoExtra;
nbytesRead = (long) (rep.nCrtcs * 4 +
rep.nModes * 4 +
@@ -88,8 +90,10 @@ XRRGetOutputInfo (Display *dpy, XRRScreenResources *resources, RROutput output)
xoi->timestamp = rep.timestamp;
xoi->crtc = rep.crtc;
+ xoi->current_options = rep.currentOptions;
xoi->connection = rep.connection;
xoi->subpixel_order = rep.subpixelOrder;
+ xoi->possible_options = rep.possibleOptions;
xoi->ncrtc = rep.nCrtcs;
xoi->crtcs = (RRCrtc *) (xoi + 1);
xoi->nmode = rep.nModes;