aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/randr
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/randr')
-rw-r--r--xorg-server/randr/randr.c2
-rw-r--r--xorg-server/randr/rrcrtc.c2
-rw-r--r--xorg-server/randr/rrdispatch.c22
-rw-r--r--xorg-server/randr/rrproperty.c2
-rw-r--r--xorg-server/randr/rrxinerama.c8
5 files changed, 21 insertions, 15 deletions
diff --git a/xorg-server/randr/randr.c b/xorg-server/randr/randr.c
index 1c1d0c4f2..594456485 100644
--- a/xorg-server/randr/randr.c
+++ b/xorg-server/randr/randr.c
@@ -98,6 +98,8 @@ RRCloseScreen (int i, ScreenPtr pScreen)
for (j = pScrPriv->numOutputs - 1; j >= 0; j--)
RROutputDestroy (pScrPriv->outputs[j]);
+ xfree (pScrPriv->crtcs);
+ xfree (pScrPriv->outputs);
xfree (pScrPriv);
RRNScreens -= 1; /* ok, one fewer screen with RandR running */
return (*pScreen->CloseScreen) (i, pScreen);
diff --git a/xorg-server/randr/rrcrtc.c b/xorg-server/randr/rrcrtc.c
index 0e14b36dd..d4bf342f3 100644
--- a/xorg-server/randr/rrcrtc.c
+++ b/xorg-server/randr/rrcrtc.c
@@ -542,7 +542,7 @@ RRModeGetScanoutSize (RRModePtr mode, PictTransformPtr transform,
void
RRCrtcGetScanoutSize(RRCrtcPtr crtc, int *width, int *height)
{
- return RRModeGetScanoutSize (crtc->mode, &crtc->transform, width, height);
+ RRModeGetScanoutSize (crtc->mode, &crtc->transform, width, height);
}
/*
diff --git a/xorg-server/randr/rrdispatch.c b/xorg-server/randr/rrdispatch.c
index bec5b08af..ffb46a48c 100644
--- a/xorg-server/randr/rrdispatch.c
+++ b/xorg-server/randr/rrdispatch.c
@@ -21,9 +21,7 @@
*/
#include "randrstr.h"
-
-#define SERVER_RANDR_MAJOR 1
-#define SERVER_RANDR_MINOR 3
+#include "protocol-versions.h"
Bool
RRClientKnowsRates (ClientPtr pClient)
@@ -48,12 +46,18 @@ ProcRRQueryVersion (ClientPtr client)
rep.type = X_Reply;
rep.length = 0;
rep.sequenceNumber = client->sequence;
- /*
- * Report the current version; the current
- * spec says they're all compatible after 1.0
- */
- rep.majorVersion = SERVER_RANDR_MAJOR;
- rep.minorVersion = SERVER_RANDR_MINOR;
+
+ if ((stuff->majorVersion * 1000 + stuff->minorVersion) <
+ (SERVER_RANDR_MAJOR_VERSION * 1000 + SERVER_RANDR_MINOR_VERSION))
+ {
+ rep.majorVersion = stuff->majorVersion;
+ rep.minorVersion = stuff->minorVersion;
+ } else
+ {
+ rep.majorVersion = SERVER_RANDR_MAJOR_VERSION;
+ rep.minorVersion = SERVER_RANDR_MINOR_VERSION;
+ }
+
if (client->swapped) {
swaps(&rep.sequenceNumber, n);
swapl(&rep.length, n);
diff --git a/xorg-server/randr/rrproperty.c b/xorg-server/randr/rrproperty.c
index 6187b855f..146facbe1 100644
--- a/xorg-server/randr/rrproperty.c
+++ b/xorg-server/randr/rrproperty.c
@@ -126,6 +126,8 @@ RRDestroyOutputProperty (RRPropertyPtr prop)
xfree(prop->current.data);
if (prop->pending.data)
xfree(prop->pending.data);
+ if (prop->valid_values)
+ xfree(prop->valid_values);
xfree(prop);
}
diff --git a/xorg-server/randr/rrxinerama.c b/xorg-server/randr/rrxinerama.c
index 97be7c1e6..94c8e54e5 100644
--- a/xorg-server/randr/rrxinerama.c
+++ b/xorg-server/randr/rrxinerama.c
@@ -71,9 +71,7 @@
#include "randrstr.h"
#include "swaprep.h"
#include <X11/extensions/panoramiXproto.h>
-
-#define RR_XINERAMA_MAJOR_VERSION 1
-#define RR_XINERAMA_MINOR_VERSION 1
+#include "protocol-versions.h"
/* Xinerama is not multi-screen capable; just report about screen 0 */
#define RR_XINERAMA_SCREEN 0
@@ -98,8 +96,8 @@ ProcRRXineramaQueryVersion(ClientPtr client)
rep.type = X_Reply;
rep.length = 0;
rep.sequenceNumber = client->sequence;
- rep.majorVersion = RR_XINERAMA_MAJOR_VERSION;
- rep.minorVersion = RR_XINERAMA_MINOR_VERSION;
+ rep.majorVersion = SERVER_RRXINERAMA_MAJOR_VERSION;
+ rep.minorVersion = SERVER_RRXINERAMA_MINOR_VERSION;
if(client->swapped) {
swaps(&rep.sequenceNumber, n);
swapl(&rep.length, n);