summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2012-06-29 14:09:16 +0100
committerDave Airlie <airlied@redhat.com>2012-06-29 14:09:16 +0100
commit1dfa6aa7474d12b23cc21f5f3e3a60fcc89c660c (patch)
treea3c23b9dd9039230fa6350a4132f1f8eb9e6cfdb
parentd07a08774e19672c82fe0cdcb1ae931a3b25d5b1 (diff)
update with latest changes to protocol
-rw-r--r--include/X11/extensions/Xrandr.h12
-rw-r--r--src/Xrandr.c20
-rw-r--r--src/XrrProvider.c1
3 files changed, 33 insertions, 0 deletions
diff --git a/include/X11/extensions/Xrandr.h b/include/X11/extensions/Xrandr.h
index d293a4b..27aa496 100644
--- a/include/X11/extensions/Xrandr.h
+++ b/include/X11/extensions/Xrandr.h
@@ -128,6 +128,7 @@ typedef struct {
Window window; /* window which selected for this event */
int subtype; /* RRNotify_ProviderChange */
RRProvider provider; /* current provider (or None) */
+ Time timestamp; /* time of change */
unsigned int current_role;
} XRRProviderChangeNotifyEvent;
@@ -144,6 +145,16 @@ typedef struct {
int state; /* NewValue, Deleted */
} XRRProviderPropertyNotifyEvent;
+typedef struct {
+ int type; /* event base */
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Window window; /* window which selected for this event */
+ int subtype; /* RRNotify_ResourceChange */
+ Time timestamp; /* time of change */
+} XRRResourceChangeNotifyEvent;
+
/* internal representation is private to the library */
typedef struct _XRRScreenConfiguration XRRScreenConfiguration;
@@ -482,6 +493,7 @@ typedef struct _XRRProviderResources {
int nproviders;
RRProvider *providers;
unsigned int flags;
+ unsigned int max_master;
} XRRProviderResources;
XRRProviderResources *
diff --git a/src/Xrandr.c b/src/Xrandr.c
index b7ddfba..a16a06e 100644
--- a/src/Xrandr.c
+++ b/src/Xrandr.c
@@ -148,6 +148,7 @@ static Bool XRRWireToEvent(Display *dpy, XEvent *event, xEvent *wire)
aevent->subtype = awire->subCode;
aevent->provider = awire->provider;
aevent->current_role = awire->current_role;
+ aevent->timestamp = awire->timestamp;
return True;
}
case RRNotify_ProviderProperty: {
@@ -165,6 +166,18 @@ static Bool XRRWireToEvent(Display *dpy, XEvent *event, xEvent *wire)
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;
}
}
@@ -259,6 +272,13 @@ static Status XRREventToWire(Display *dpy, XEvent *event, xEvent *wire)
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;
+ }
}
}
}
diff --git a/src/XrrProvider.c b/src/XrrProvider.c
index b6c3593..e0f152b 100644
--- a/src/XrrProvider.c
+++ b/src/XrrProvider.c
@@ -73,6 +73,7 @@ XRRGetProviderResources(Display *dpy, Window window)
return NULL;
}
+ xrpr->max_master = rep.maxMaster;
xrpr->timestamp = rep.timestamp;
xrpr->nproviders = rep.nProviders;
xrpr->flags = rep.flags;