summaryrefslogtreecommitdiff
path: root/src/Xrandr.c
diff options
context:
space:
mode:
authorJulien Cristau <jcristau@debian.org>2008-12-01 20:59:39 +0100
committerJulien Cristau <jcristau@debian.org>2008-12-01 22:54:28 +0100
commit83e567f427f68dc4ae2de796a1184748bbe0238e (patch)
tree45f4a7e79102d63935f0e50d1bcf4b7fc168c582 /src/Xrandr.c
parent908de8fc7228ecc7b02825ebede5fb937f3abf1b (diff)
parent00f2e30d0b8296668776d62a4c47f96bf95faa08 (diff)
Merge branch 'transform-proposal' of git.freedesktop.org:/git/xorg/lib/libXrandr
Conflicts: src/Xrandr.c
Diffstat (limited to 'src/Xrandr.c')
-rw-r--r--src/Xrandr.c24
1 files changed, 16 insertions, 8 deletions
diff --git a/src/Xrandr.c b/src/Xrandr.c
index e3f9931..2de995c 100644
--- a/src/Xrandr.c
+++ b/src/Xrandr.c
@@ -86,18 +86,16 @@ static Bool XRRWireToEvent(Display *dpy, XEvent *event, xEvent *wire)
return True;
}
case RRNotify: {
- XRRNotifyEvent *aevent = (XRRNotifyEvent *) event;
- xRRCrtcChangeNotifyEvent *awire = (xRRCrtcChangeNotifyEvent *) wire;
- aevent->type = awire->type & 0x7F;
- aevent->serial = _XSetLastRequestRead(dpy, (xGenericReply *) wire);
- aevent->send_event = (awire->type & 0x80) != 0;
- aevent->display = dpy;
- aevent->subtype = awire->subCode;
- switch (aevent->subtype) {
+ switch (wire->u.u.detail) {
case RRNotify_OutputChange: {
XRROutputChangeNotifyEvent *aevent = (XRROutputChangeNotifyEvent *) event;
xRROutputChangeNotifyEvent *awire = (xRROutputChangeNotifyEvent *) wire;
+ aevent->type = awire->type & 0x7F;
+ aevent->serial = _XSetLastRequestRead(dpy, (xGenericReply *) wire);
+ aevent->send_event = (awire->type & 0x80) != 0;
+ aevent->display = dpy;
aevent->window = awire->window;
+ aevent->subtype = awire->subCode;
aevent->output = awire->output;
aevent->crtc = awire->crtc;
aevent->mode = awire->mode;
@@ -109,7 +107,12 @@ static Bool XRRWireToEvent(Display *dpy, XEvent *event, xEvent *wire)
case RRNotify_CrtcChange: {
XRRCrtcChangeNotifyEvent *aevent = (XRRCrtcChangeNotifyEvent *) event;
xRRCrtcChangeNotifyEvent *awire = (xRRCrtcChangeNotifyEvent *) wire;
+ aevent->type = awire->type & 0x7F;
+ aevent->serial = _XSetLastRequestRead(dpy, (xGenericReply *) wire);
+ aevent->send_event = (awire->type & 0x80) != 0;
+ aevent->display = dpy;
aevent->window = awire->window;
+ aevent->subtype = awire->subCode;
aevent->crtc = awire->crtc;
aevent->mode = awire->mode;
aevent->rotation = awire->rotation;
@@ -122,7 +125,12 @@ static Bool XRRWireToEvent(Display *dpy, XEvent *event, xEvent *wire)
case RRNotify_OutputProperty: {
XRROutputPropertyNotifyEvent *aevent = (XRROutputPropertyNotifyEvent *) event;
xRROutputPropertyNotifyEvent *awire = (xRROutputPropertyNotifyEvent *) wire;
+ aevent->type = awire->type & 0x7F;
+ aevent->serial = _XSetLastRequestRead(dpy, (xGenericReply *) wire);
+ aevent->send_event = (awire->type & 0x80) != 0;
+ aevent->display = dpy;
aevent->window = awire->window;
+ aevent->subtype = awire->subCode;
aevent->output = awire->output;
aevent->property = awire->atom;
aevent->timestamp = awire->timestamp;