summaryrefslogtreecommitdiff
path: root/src/Xrandr.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2012-01-20 17:40:10 +0000
committerDave Airlie <airlied@redhat.com>2012-07-19 13:12:48 +1000
commit5d2edde0bf8460aab250dd83743aedb5c66a243e (patch)
treeb35d67c73783dedcf3e32ffe22c531f3115e534a /src/Xrandr.c
parenta9457b44539420c0b7a082ef6ecc5fd3391e8801 (diff)
libXrandr: add support for provider objects.
This adds the client side libXrandr support for randr 1.4, and provider objects. Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'src/Xrandr.c')
-rw-r--r--src/Xrandr.c65
1 files changed, 64 insertions, 1 deletions
diff --git a/src/Xrandr.c b/src/Xrandr.c
index 2bdbe97..b1e97ec 100644
--- a/src/Xrandr.c
+++ b/src/Xrandr.c
@@ -137,7 +137,46 @@ static Bool XRRWireToEvent(Display *dpy, XEvent *event, xEvent *wire)
aevent->state = awire->state;
return True;
}
-
+ case RRNotify_ProviderChange: {
+ XRRProviderChangeNotifyEvent *aevent = (XRRProviderChangeNotifyEvent *) event;
+ xRRProviderChangeNotifyEvent *awire = (xRRProviderChangeNotifyEvent *) 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->provider = awire->provider;
+ aevent->timestamp = awire->timestamp;
+ return True;
+ }
+ case RRNotify_ProviderProperty: {
+ XRRProviderPropertyNotifyEvent *aevent = (XRRProviderPropertyNotifyEvent *) event;
+ xRRProviderPropertyNotifyEvent *awire = (xRRProviderPropertyNotifyEvent *) 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->provider = awire->provider;
+ aevent->property = awire->atom;
+ aevent->timestamp = awire->timestamp;
+ aevent->state = awire->state;
+ return True;
+ }
+ case RRNotify_ResourceChange: {
+ XRRResourceChangeNotifyEvent *aevent = (XRRResourceChangeNotifyEvent *) event;
+ xRRResourceChangeNotifyEvent *awire = (xRRResourceChangeNotifyEvent *) 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->timestamp = awire->timestamp;
+ return True;
+ }
break;
}
}
@@ -214,6 +253,30 @@ static Status XRREventToWire(Display *dpy, XEvent *event, xEvent *wire)
awire->state = aevent->state;
return True;
}
+ case RRNotify_ProviderChange: {
+ xRRProviderChangeNotifyEvent *awire = (xRRProviderChangeNotifyEvent *) wire;
+ XRRProviderChangeNotifyEvent *aevent = (XRRProviderChangeNotifyEvent *) event;
+ awire->window = aevent->window;
+ awire->provider = aevent->provider;
+ return True;
+ }
+ case RRNotify_ProviderProperty: {
+ xRRProviderPropertyNotifyEvent *awire = (xRRProviderPropertyNotifyEvent *) wire;
+ XRRProviderPropertyNotifyEvent *aevent = (XRRProviderPropertyNotifyEvent *) event;
+ awire->window = aevent->window;
+ awire->provider = aevent->provider;
+ awire->atom = aevent->property;
+ awire->timestamp = aevent->timestamp;
+ awire->state = aevent->state;
+ return True;
+ }
+ case RRNotify_ResourceChange: {
+ xRRResourceChangeNotifyEvent *awire = (xRRResourceChangeNotifyEvent *) wire;
+ XRRResourceChangeNotifyEvent *aevent = (XRRResourceChangeNotifyEvent *) event;
+ awire->window = aevent->window;
+ awire->timestamp = aevent->timestamp;
+ return True;
+ }
}
}
}