summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/X11/extensions/Xrandr.h4
-rw-r--r--src/XrrProvider.c8
2 files changed, 9 insertions, 3 deletions
diff --git a/include/X11/extensions/Xrandr.h b/include/X11/extensions/Xrandr.h
index 034fb4c..3ec0e4e 100644
--- a/include/X11/extensions/Xrandr.h
+++ b/include/X11/extensions/Xrandr.h
@@ -457,6 +457,7 @@ typedef struct _XRRProviderResources {
Time timestamp;
int nproviders;
RRProvider *providers;
+ unsigned int flags;
} XRRProviderResources;
XRRProviderResources *
@@ -468,6 +469,7 @@ XRRFreeProviderResources(XRRProviderResources *resources);
typedef struct _XRRProviderInfo {
unsigned int current_role;
unsigned int allowed_roles;
+ unsigned int abilities;
int ncrtcs;
int noutputs;
} XRRProviderInfo;
@@ -478,7 +480,7 @@ XRRGetProviderInfo(Display *dpy, XID provider);
void
XRRFreeProviderInfo(XRRProviderInfo *provider);
-void
+int
XRRSetProviderRole(Display *dpy, XID provider,
int new_role, int switch_master);
diff --git a/src/XrrProvider.c b/src/XrrProvider.c
index e1b83ba..9597370 100644
--- a/src/XrrProvider.c
+++ b/src/XrrProvider.c
@@ -75,7 +75,7 @@ XRRGetProviderResources(Display *dpy, Window window)
xrpr->timestamp = rep.timestamp;
xrpr->nproviders = rep.nProviders;
-
+ xrpr->flags = rep.flags;
xrpr->providers = (RRProvider *)(xrpr + 1);
_XRead32(dpy, xrpr->providers, rep.nProviders << 2);
@@ -118,6 +118,8 @@ XRRGetProviderInfo(Display *dpy, XID provider)
nbytes = (long) rep.length << 2;
+ rbytes = sizeof(XRRProviderInfo);
+
xpi = (XRRProviderInfo *)Xmalloc(rbytes);
if (xpi == NULL) {
_XEatData (dpy, (unsigned long) nbytes);
@@ -127,6 +129,7 @@ XRRGetProviderInfo(Display *dpy, XID provider)
}
xpi->allowed_roles = rep.allowed_roles;
+ xpi->abilities = rep.abilities;
xpi->current_role = rep.current_role;
xpi->ncrtcs = rep.nCrtcs;
xpi->noutputs = rep.nOutputs;
@@ -141,7 +144,7 @@ XRRFreeProviderInfo(XRRProviderInfo *provider)
free(provider);
}
-void
+int
XRRSetProviderRole(Display *dpy, XID provider,
int new_role, int switch_master)
{
@@ -158,4 +161,5 @@ XRRSetProviderRole(Display *dpy, XID provider,
req->exclusive_master = switch_master;
UnlockDisplay (dpy);
SyncHandle ();
+ return 0;
}