input: define server-supported protocol versions in one single file.
include/protocol-versions.h specifies each extension version as supported by the server and sent back on the wire to the client. This fixes up several issues with the server potentially reporting a higher version of the protocol if recompiled against a newer version of the protocol. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Rémi Cardona <remi@gentoo.org> Acked-by: Julien Cristau <jcristau@debian.org>
This commit is contained in:
parent
0b7c6c728c
commit
55747d256d
|
@ -32,10 +32,7 @@
|
||||||
|
|
||||||
#include "geint.h"
|
#include "geint.h"
|
||||||
#include "geext.h"
|
#include "geext.h"
|
||||||
|
#include "protocol-versions.h"
|
||||||
/* Currently supported XGE version */
|
|
||||||
#define SERVER_GE_MAJOR 1
|
|
||||||
#define SERVER_GE_MINOR 0
|
|
||||||
|
|
||||||
#define rClient(obj) (clients[CLIENT_ID((obj)->resource)])
|
#define rClient(obj) (clients[CLIENT_ID((obj)->resource)])
|
||||||
|
|
||||||
|
@ -81,8 +78,8 @@ ProcGEQueryVersion(ClientPtr client)
|
||||||
rep.sequenceNumber = client->sequence;
|
rep.sequenceNumber = client->sequence;
|
||||||
|
|
||||||
/* return the supported version by the server */
|
/* return the supported version by the server */
|
||||||
rep.majorVersion = SERVER_GE_MAJOR;
|
rep.majorVersion = SERVER_GE_MAJOR_VERSION;
|
||||||
rep.minorVersion = SERVER_GE_MINOR;
|
rep.minorVersion = SERVER_GE_MINOR_VERSION;
|
||||||
|
|
||||||
/* Remember version the client requested */
|
/* Remember version the client requested */
|
||||||
pGEClient->major_version = stuff->majorVersion;
|
pGEClient->major_version = stuff->majorVersion;
|
||||||
|
|
|
@ -56,9 +56,7 @@ Equipment Corporation.
|
||||||
#include "picturestr.h"
|
#include "picturestr.h"
|
||||||
#endif
|
#endif
|
||||||
#include "modinit.h"
|
#include "modinit.h"
|
||||||
|
#include "protocol-versions.h"
|
||||||
#define SERVER_PANORAMIX_MAJOR_VERSION 1
|
|
||||||
#define SERVER_PANORAMIX_MINOR_VERSION 1
|
|
||||||
|
|
||||||
#ifdef GLXPROXY
|
#ifdef GLXPROXY
|
||||||
extern VisualPtr glxMatchVisual(ScreenPtr pScreen,
|
extern VisualPtr glxMatchVisual(ScreenPtr pScreen,
|
||||||
|
|
|
@ -54,6 +54,7 @@ in this Software without prior written authorization from the X Consortium.
|
||||||
#ifdef DPMSExtension
|
#ifdef DPMSExtension
|
||||||
#include <X11/extensions/dpmsconst.h>
|
#include <X11/extensions/dpmsconst.h>
|
||||||
#endif
|
#endif
|
||||||
|
#include "protocol-versions.h"
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
@ -727,8 +728,8 @@ ProcScreenSaverQueryVersion (ClientPtr client)
|
||||||
rep.type = X_Reply;
|
rep.type = X_Reply;
|
||||||
rep.length = 0;
|
rep.length = 0;
|
||||||
rep.sequenceNumber = client->sequence;
|
rep.sequenceNumber = client->sequence;
|
||||||
rep.majorVersion = ScreenSaverMajorVersion;
|
rep.majorVersion = SERVER_SAVER_MAJOR_VERSION;
|
||||||
rep.minorVersion = ScreenSaverMinorVersion;
|
rep.minorVersion = SERVER_SAVER_MINOR_VERSION;
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps(&rep.sequenceNumber, n);
|
swaps(&rep.sequenceNumber, n);
|
||||||
swapl(&rep.length, n);
|
swapl(&rep.length, n);
|
||||||
|
|
|
@ -39,6 +39,7 @@ in this Software without prior written authorization from The Open Group.
|
||||||
#include "securitysrv.h"
|
#include "securitysrv.h"
|
||||||
#include <X11/extensions/securproto.h>
|
#include <X11/extensions/securproto.h>
|
||||||
#include "modinit.h"
|
#include "modinit.h"
|
||||||
|
#include "protocol-versions.h"
|
||||||
|
|
||||||
/* Extension stuff */
|
/* Extension stuff */
|
||||||
static int SecurityErrorBase; /* first Security error number */
|
static int SecurityErrorBase; /* first Security error number */
|
||||||
|
@ -371,8 +372,8 @@ ProcSecurityQueryVersion(
|
||||||
rep.type = X_Reply;
|
rep.type = X_Reply;
|
||||||
rep.sequenceNumber = client->sequence;
|
rep.sequenceNumber = client->sequence;
|
||||||
rep.length = 0;
|
rep.length = 0;
|
||||||
rep.majorVersion = SECURITY_MAJOR_VERSION;
|
rep.majorVersion = SERVER_SECURITY_MAJOR_VERSION;
|
||||||
rep.minorVersion = SECURITY_MINOR_VERSION;
|
rep.minorVersion = SERVER_SECURITY_MINOR_VERSION;
|
||||||
if(client->swapped)
|
if(client->swapped)
|
||||||
{
|
{
|
||||||
char n;
|
char n;
|
||||||
|
|
|
@ -45,6 +45,7 @@ in this Software without prior written authorization from The Open Group.
|
||||||
#include "regionstr.h"
|
#include "regionstr.h"
|
||||||
#include "gcstruct.h"
|
#include "gcstruct.h"
|
||||||
#include "modinit.h"
|
#include "modinit.h"
|
||||||
|
#include "protocol-versions.h"
|
||||||
|
|
||||||
typedef RegionPtr (*CreateDftPtr)(
|
typedef RegionPtr (*CreateDftPtr)(
|
||||||
WindowPtr /* pWin */
|
WindowPtr /* pWin */
|
||||||
|
@ -259,8 +260,8 @@ ProcShapeQueryVersion (ClientPtr client)
|
||||||
rep.type = X_Reply;
|
rep.type = X_Reply;
|
||||||
rep.length = 0;
|
rep.length = 0;
|
||||||
rep.sequenceNumber = client->sequence;
|
rep.sequenceNumber = client->sequence;
|
||||||
rep.majorVersion = SHAPE_MAJOR_VERSION;
|
rep.majorVersion = SERVER_SHAPE_MAJOR_VERSION;
|
||||||
rep.minorVersion = SHAPE_MINOR_VERSION;
|
rep.minorVersion = SERVER_SHAPE_MINOR_VERSION;
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps(&rep.sequenceNumber, n);
|
swaps(&rep.sequenceNumber, n);
|
||||||
swapl(&rep.length, n);
|
swapl(&rep.length, n);
|
||||||
|
|
|
@ -54,6 +54,7 @@ in this Software without prior written authorization from The Open Group.
|
||||||
#include "xace.h"
|
#include "xace.h"
|
||||||
#include <X11/extensions/shmproto.h>
|
#include <X11/extensions/shmproto.h>
|
||||||
#include <X11/Xfuncproto.h>
|
#include <X11/Xfuncproto.h>
|
||||||
|
#include "protocol-versions.h"
|
||||||
|
|
||||||
/* Needed for Solaris cross-zone shared memory extension */
|
/* Needed for Solaris cross-zone shared memory extension */
|
||||||
#ifdef HAVE_SHMCTL64
|
#ifdef HAVE_SHMCTL64
|
||||||
|
@ -313,8 +314,8 @@ ProcShmQueryVersion(ClientPtr client)
|
||||||
rep.sequenceNumber = client->sequence;
|
rep.sequenceNumber = client->sequence;
|
||||||
rep.sharedPixmaps = sharedPixmaps;
|
rep.sharedPixmaps = sharedPixmaps;
|
||||||
rep.pixmapFormat = sharedPixmaps ? ZPixmap : 0;
|
rep.pixmapFormat = sharedPixmaps ? ZPixmap : 0;
|
||||||
rep.majorVersion = SHM_MAJOR_VERSION;
|
rep.majorVersion = SERVER_SHM_MAJOR_VERSION;
|
||||||
rep.minorVersion = SHM_MINOR_VERSION;
|
rep.minorVersion = SERVER_SHM_MINOR_VERSION;
|
||||||
rep.uid = geteuid();
|
rep.uid = geteuid();
|
||||||
rep.gid = getegid();
|
rep.gid = getegid();
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
|
|
|
@ -32,6 +32,7 @@
|
||||||
#include "dixstruct.h"
|
#include "dixstruct.h"
|
||||||
#include "extnsionst.h"
|
#include "extnsionst.h"
|
||||||
#include "swaprep.h"
|
#include "swaprep.h"
|
||||||
|
#include "protocol-versions.h"
|
||||||
|
|
||||||
#include <X11/extensions/xcalibrateproto.h>
|
#include <X11/extensions/xcalibrateproto.h>
|
||||||
#include <X11/extensions/xcalibratewire.h>
|
#include <X11/extensions/xcalibratewire.h>
|
||||||
|
@ -79,8 +80,8 @@ ProcXCalibrateQueryVersion (ClientPtr client)
|
||||||
rep.type = X_Reply;
|
rep.type = X_Reply;
|
||||||
rep.length = 0;
|
rep.length = 0;
|
||||||
rep.sequenceNumber = client->sequence;
|
rep.sequenceNumber = client->sequence;
|
||||||
rep.majorVersion = XCALIBRATE_MAJOR_VERSION;
|
rep.majorVersion = SERVER_XCALIBRATE_MAJOR_VERSION;
|
||||||
rep.minorVersion = XCALIBRATE_MINOR_VERSION;
|
rep.minorVersion = SERVER_XCALIBRATE_MINOR_VERSION;
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
int n;
|
int n;
|
||||||
swaps(&rep.sequenceNumber, n);
|
swaps(&rep.sequenceNumber, n);
|
||||||
|
|
|
@ -71,6 +71,7 @@
|
||||||
#include "gcstruct.h"
|
#include "gcstruct.h"
|
||||||
#include "dixfontstr.h"
|
#include "dixfontstr.h"
|
||||||
#include "extnsionst.h"
|
#include "extnsionst.h"
|
||||||
|
#include "protocol-versions.h"
|
||||||
|
|
||||||
#include <X11/extensions/xf86bigfproto.h>
|
#include <X11/extensions/xf86bigfproto.h>
|
||||||
|
|
||||||
|
@ -338,8 +339,8 @@ ProcXF86BigfontQueryVersion(
|
||||||
reply.type = X_Reply;
|
reply.type = X_Reply;
|
||||||
reply.length = 0;
|
reply.length = 0;
|
||||||
reply.sequenceNumber = client->sequence;
|
reply.sequenceNumber = client->sequence;
|
||||||
reply.majorVersion = XF86BIGFONT_MAJOR_VERSION;
|
reply.majorVersion = SERVER_XF86BIGFONT_MAJOR_VERSION;
|
||||||
reply.minorVersion = XF86BIGFONT_MINOR_VERSION;
|
reply.minorVersion = SERVER_XF86BIGFONT_MINOR_VERSION;
|
||||||
reply.uid = geteuid();
|
reply.uid = geteuid();
|
||||||
reply.gid = getegid();
|
reply.gid = getegid();
|
||||||
#ifdef HAS_SHM
|
#ifdef HAS_SHM
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
#include "windowstr.h"
|
#include "windowstr.h"
|
||||||
#include "gcstruct.h"
|
#include "gcstruct.h"
|
||||||
#include "modinit.h"
|
#include "modinit.h"
|
||||||
|
#include "protocol-versions.h"
|
||||||
|
|
||||||
static int
|
static int
|
||||||
ProcXResQueryVersion (ClientPtr client)
|
ProcXResQueryVersion (ClientPtr client)
|
||||||
|
@ -39,8 +40,8 @@ ProcXResQueryVersion (ClientPtr client)
|
||||||
rep.type = X_Reply;
|
rep.type = X_Reply;
|
||||||
rep.length = 0;
|
rep.length = 0;
|
||||||
rep.sequenceNumber = client->sequence;
|
rep.sequenceNumber = client->sequence;
|
||||||
rep.server_major = XRES_MAJOR_VERSION;
|
rep.server_major = SERVER_XRES_MAJOR_VERSION;
|
||||||
rep.server_minor = XRES_MINOR_VERSION;
|
rep.server_minor = SERVER_XRES_MINOR_VERSION;
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
int n;
|
int n;
|
||||||
swaps(&rep.sequenceNumber, n);
|
swaps(&rep.sequenceNumber, n);
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
#include <X11/extensions/Xvproto.h>
|
#include <X11/extensions/Xvproto.h>
|
||||||
#include <X11/extensions/XvMCproto.h>
|
#include <X11/extensions/XvMCproto.h>
|
||||||
#include "xvmcext.h"
|
#include "xvmcext.h"
|
||||||
|
#include "protocol-versions.h"
|
||||||
|
|
||||||
#ifdef HAS_XVMCSHM
|
#ifdef HAS_XVMCSHM
|
||||||
#include <sys/ipc.h>
|
#include <sys/ipc.h>
|
||||||
|
@ -116,8 +117,8 @@ ProcXvMCQueryVersion(ClientPtr client)
|
||||||
rep.type = X_Reply;
|
rep.type = X_Reply;
|
||||||
rep.sequenceNumber = client->sequence;
|
rep.sequenceNumber = client->sequence;
|
||||||
rep.length = 0;
|
rep.length = 0;
|
||||||
rep.major = XvMCVersion;
|
rep.major = SERVER_XVMC_MAJOR_VERSION;
|
||||||
rep.minor = XvMCRevision;
|
rep.minor = SERVER_XVMC_MINOR_VERSION;
|
||||||
WriteToClient(client, sizeof(xvmcQueryVersionReply), (char*)&rep);
|
WriteToClient(client, sizeof(xvmcQueryVersionReply), (char*)&rep);
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
10
Xi/extinit.c
10
Xi/extinit.c
|
@ -72,6 +72,7 @@ SOFTWARE.
|
||||||
#include "swaprep.h"
|
#include "swaprep.h"
|
||||||
#include "registry.h"
|
#include "registry.h"
|
||||||
#include "privates.h"
|
#include "privates.h"
|
||||||
|
#include "protocol-versions.h"
|
||||||
|
|
||||||
/* modules local to Xi */
|
/* modules local to Xi */
|
||||||
#include "allowev.h"
|
#include "allowev.h"
|
||||||
|
@ -380,11 +381,6 @@ Mask PropagateMask[MAXDEVICES];
|
||||||
static int XIClientPrivateKeyIndex;
|
static int XIClientPrivateKeyIndex;
|
||||||
DevPrivateKey XIClientPrivateKey = &XIClientPrivateKeyIndex;
|
DevPrivateKey XIClientPrivateKey = &XIClientPrivateKeyIndex;
|
||||||
|
|
||||||
static XExtensionVersion thisversion = { XI_Present,
|
|
||||||
XI_2_Major,
|
|
||||||
XI_2_Minor
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************
|
/*****************************************************************
|
||||||
*
|
*
|
||||||
|
@ -1255,6 +1251,10 @@ void
|
||||||
XInputExtensionInit(void)
|
XInputExtensionInit(void)
|
||||||
{
|
{
|
||||||
ExtensionEntry *extEntry;
|
ExtensionEntry *extEntry;
|
||||||
|
XExtensionVersion thisversion = { XI_Present,
|
||||||
|
SERVER_XI_MAJOR_VERSION,
|
||||||
|
SERVER_XI_MINOR_VERSION,
|
||||||
|
};
|
||||||
|
|
||||||
if (!dixRequestPrivate(XIClientPrivateKey, sizeof(XIClientRec)))
|
if (!dixRequestPrivate(XIClientPrivateKey, sizeof(XIClientRec)))
|
||||||
FatalError("Cannot request private for XI.\n");
|
FatalError("Cannot request private for XI.\n");
|
||||||
|
|
|
@ -53,9 +53,7 @@
|
||||||
|
|
||||||
#include "compint.h"
|
#include "compint.h"
|
||||||
#include "xace.h"
|
#include "xace.h"
|
||||||
|
#include "protocol-versions.h"
|
||||||
#define SERVER_COMPOSITE_MAJOR 0
|
|
||||||
#define SERVER_COMPOSITE_MINOR 4
|
|
||||||
|
|
||||||
static CARD8 CompositeReqCode;
|
static CARD8 CompositeReqCode;
|
||||||
static int CompositeClientPrivateKeyIndex;
|
static int CompositeClientPrivateKeyIndex;
|
||||||
|
@ -124,12 +122,12 @@ ProcCompositeQueryVersion (ClientPtr client)
|
||||||
rep.type = X_Reply;
|
rep.type = X_Reply;
|
||||||
rep.length = 0;
|
rep.length = 0;
|
||||||
rep.sequenceNumber = client->sequence;
|
rep.sequenceNumber = client->sequence;
|
||||||
if (stuff->majorVersion < SERVER_COMPOSITE_MAJOR) {
|
if (stuff->majorVersion < SERVER_COMPOSITE_MAJOR_VERSION) {
|
||||||
rep.majorVersion = stuff->majorVersion;
|
rep.majorVersion = stuff->majorVersion;
|
||||||
rep.minorVersion = stuff->minorVersion;
|
rep.minorVersion = stuff->minorVersion;
|
||||||
} else {
|
} else {
|
||||||
rep.majorVersion = SERVER_COMPOSITE_MAJOR;
|
rep.majorVersion = SERVER_COMPOSITE_MAJOR_VERSION;
|
||||||
rep.minorVersion = SERVER_COMPOSITE_MINOR;
|
rep.minorVersion = SERVER_COMPOSITE_MINOR_VERSION;
|
||||||
}
|
}
|
||||||
pCompositeClient->major_version = rep.majorVersion;
|
pCompositeClient->major_version = rep.majorVersion;
|
||||||
pCompositeClient->minor_version = rep.minorVersion;
|
pCompositeClient->minor_version = rep.minorVersion;
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "damageextint.h"
|
#include "damageextint.h"
|
||||||
|
#include "protocol-versions.h"
|
||||||
|
|
||||||
static unsigned char DamageReqCode;
|
static unsigned char DamageReqCode;
|
||||||
static int DamageEventBase;
|
static int DamageEventBase;
|
||||||
|
@ -35,13 +36,6 @@ static RESTYPE DamageExtWinType;
|
||||||
static int DamageClientPrivateKeyIndex;
|
static int DamageClientPrivateKeyIndex;
|
||||||
static DevPrivateKey DamageClientPrivateKey = &DamageClientPrivateKeyIndex;
|
static DevPrivateKey DamageClientPrivateKey = &DamageClientPrivateKeyIndex;
|
||||||
|
|
||||||
/* Version of the damage extension supported by the server, as opposed to the
|
|
||||||
* DAMAGE_* defines from damageproto for what version the proto header
|
|
||||||
* supports.
|
|
||||||
*/
|
|
||||||
#define SERVER_DAMAGE_MAJOR 1
|
|
||||||
#define SERVER_DAMAGE_MINOR 1
|
|
||||||
|
|
||||||
#define prScreen screenInfo.screens[0]
|
#define prScreen screenInfo.screens[0]
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -148,16 +142,16 @@ ProcDamageQueryVersion(ClientPtr client)
|
||||||
rep.type = X_Reply;
|
rep.type = X_Reply;
|
||||||
rep.length = 0;
|
rep.length = 0;
|
||||||
rep.sequenceNumber = client->sequence;
|
rep.sequenceNumber = client->sequence;
|
||||||
if (stuff->majorVersion < SERVER_DAMAGE_MAJOR) {
|
if (stuff->majorVersion < SERVER_DAMAGE_MAJOR_VERSION) {
|
||||||
rep.majorVersion = stuff->majorVersion;
|
rep.majorVersion = stuff->majorVersion;
|
||||||
rep.minorVersion = stuff->minorVersion;
|
rep.minorVersion = stuff->minorVersion;
|
||||||
} else {
|
} else {
|
||||||
rep.majorVersion = SERVER_DAMAGE_MAJOR;
|
rep.majorVersion = SERVER_DAMAGE_MAJOR_VERSION;
|
||||||
if (stuff->majorVersion == SERVER_DAMAGE_MAJOR &&
|
if (stuff->majorVersion == SERVER_DAMAGE_MAJOR_VERSION &&
|
||||||
stuff->minorVersion < SERVER_DAMAGE_MINOR)
|
stuff->minorVersion < SERVER_DAMAGE_MINOR_VERSION)
|
||||||
rep.minorVersion = stuff->minorVersion;
|
rep.minorVersion = stuff->minorVersion;
|
||||||
else
|
else
|
||||||
rep.minorVersion = SERVER_DAMAGE_MINOR;
|
rep.minorVersion = SERVER_DAMAGE_MINOR_VERSION;
|
||||||
}
|
}
|
||||||
pDamageClient->major_version = rep.majorVersion;
|
pDamageClient->major_version = rep.majorVersion;
|
||||||
pDamageClient->minor_version = rep.minorVersion;
|
pDamageClient->minor_version = rep.minorVersion;
|
||||||
|
|
|
@ -50,6 +50,7 @@
|
||||||
#include "indirect_dispatch.h"
|
#include "indirect_dispatch.h"
|
||||||
#include "indirect_table.h"
|
#include "indirect_table.h"
|
||||||
#include "indirect_util.h"
|
#include "indirect_util.h"
|
||||||
|
#include "protocol-versions.h"
|
||||||
|
|
||||||
static int
|
static int
|
||||||
validGlxScreen(ClientPtr client, int screen, __GLXscreen **pGlxScreen, int *err)
|
validGlxScreen(ClientPtr client, int screen, __GLXscreen **pGlxScreen, int *err)
|
||||||
|
@ -738,8 +739,8 @@ int __glXDisp_QueryVersion(__GLXclientState *cl, GLbyte *pc)
|
||||||
** client if it wants to work with older clients; however, in this
|
** client if it wants to work with older clients; however, in this
|
||||||
** implementation the server just returns its version number.
|
** implementation the server just returns its version number.
|
||||||
*/
|
*/
|
||||||
reply.majorVersion = GLX_SERVER_MAJOR_VERSION;
|
reply.majorVersion = SERVER_GLX_MAJOR_VERSION;
|
||||||
reply.minorVersion = GLX_SERVER_MINOR_VERSION;
|
reply.minorVersion = SERVER_GLX_MINOR_VERSION;
|
||||||
reply.length = 0;
|
reply.length = 0;
|
||||||
reply.type = X_Reply;
|
reply.type = X_Reply;
|
||||||
reply.sequenceNumber = client->sequence;
|
reply.sequenceNumber = client->sequence;
|
||||||
|
|
|
@ -64,10 +64,6 @@ typedef struct __GLXcontext __GLXcontext;
|
||||||
#include "glxdrawable.h"
|
#include "glxdrawable.h"
|
||||||
#include "glxcontext.h"
|
#include "glxcontext.h"
|
||||||
|
|
||||||
|
|
||||||
#define GLX_SERVER_MAJOR_VERSION 1
|
|
||||||
#define GLX_SERVER_MINOR_VERSION 2
|
|
||||||
|
|
||||||
#ifndef True
|
#ifndef True
|
||||||
#define True 1
|
#define True 1
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -57,6 +57,7 @@
|
||||||
#include "dmxextension.h"
|
#include "dmxextension.h"
|
||||||
#include <X11/extensions/dmxproto.h>
|
#include <X11/extensions/dmxproto.h>
|
||||||
#include <X11/extensions/dmx.h>
|
#include <X11/extensions/dmx.h>
|
||||||
|
#include "protocol-versions.h"
|
||||||
|
|
||||||
#ifdef PANORAMIX
|
#ifdef PANORAMIX
|
||||||
#include "panoramiX.h"
|
#include "panoramiX.h"
|
||||||
|
@ -223,9 +224,9 @@ static int ProcDMXQueryVersion(ClientPtr client)
|
||||||
rep.type = X_Reply;
|
rep.type = X_Reply;
|
||||||
rep.sequenceNumber = client->sequence;
|
rep.sequenceNumber = client->sequence;
|
||||||
rep.length = 0;
|
rep.length = 0;
|
||||||
rep.majorVersion = DMX_EXTENSION_MAJOR;
|
rep.majorVersion = SERVER_DMX_MAJOR_VERSION;
|
||||||
rep.minorVersion = DMX_EXTENSION_MINOR;
|
rep.minorVersion = SERVER_DMX_MINOR_VERSION;
|
||||||
rep.patchVersion = DMX_EXTENSION_PATCH;
|
rep.patchVersion = SERVER_DMX_PATCH_VERSION;
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps(&rep.sequenceNumber, n);
|
swaps(&rep.sequenceNumber, n);
|
||||||
swapl(&rep.length, n);
|
swapl(&rep.length, n);
|
||||||
|
|
|
@ -54,7 +54,7 @@
|
||||||
#include "hostx.h"
|
#include "hostx.h"
|
||||||
#define _HAVE_XALLOC_DECLS
|
#define _HAVE_XALLOC_DECLS
|
||||||
#include "ephyrlog.h"
|
#include "ephyrlog.h"
|
||||||
|
#include "protocol-versions.h"
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
int foo;
|
int foo;
|
||||||
|
@ -622,9 +622,9 @@ ProcXF86DRIQueryVersion (register ClientPtr client)
|
||||||
rep.type = X_Reply;
|
rep.type = X_Reply;
|
||||||
rep.length = 0;
|
rep.length = 0;
|
||||||
rep.sequenceNumber = client->sequence;
|
rep.sequenceNumber = client->sequence;
|
||||||
rep.majorVersion = XF86DRI_MAJOR_VERSION;
|
rep.majorVersion = SERVER_XF86DRI_MAJOR_VERSION;
|
||||||
rep.minorVersion = XF86DRI_MINOR_VERSION;
|
rep.minorVersion = SERVER_XF86DRI_MINOR_VERSION;
|
||||||
rep.patchVersion = XF86DRI_PATCH_VERSION;
|
rep.patchVersion = SERVER_XF86DRI_PATCH_VERSION;
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps(&rep.sequenceNumber, n);
|
swaps(&rep.sequenceNumber, n);
|
||||||
swapl(&rep.length, n);
|
swapl(&rep.length, n);
|
||||||
|
|
|
@ -26,6 +26,7 @@
|
||||||
#include "swaprep.h"
|
#include "swaprep.h"
|
||||||
#include "dgaproc.h"
|
#include "dgaproc.h"
|
||||||
#include "xf86dgaext.h"
|
#include "xf86dgaext.h"
|
||||||
|
#include "protocol-versions.h"
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
@ -122,8 +123,8 @@ ProcXDGAQueryVersion(ClientPtr client)
|
||||||
rep.type = X_Reply;
|
rep.type = X_Reply;
|
||||||
rep.length = 0;
|
rep.length = 0;
|
||||||
rep.sequenceNumber = client->sequence;
|
rep.sequenceNumber = client->sequence;
|
||||||
rep.majorVersion = XDGA_MAJOR_VERSION;
|
rep.majorVersion = SERVER_XDGA_MAJOR_VERSION;
|
||||||
rep.minorVersion = XDGA_MINOR_VERSION;
|
rep.minorVersion = SERVER_XDGA_MINOR_VERSION;
|
||||||
|
|
||||||
WriteToClient(client, sizeof(xXDGAQueryVersionReply), (char *)&rep);
|
WriteToClient(client, sizeof(xXDGAQueryVersionReply), (char *)&rep);
|
||||||
return (client->noClientException);
|
return (client->noClientException);
|
||||||
|
|
|
@ -46,6 +46,7 @@ from Kaleb S. KEITHLEY
|
||||||
#include "xf86.h"
|
#include "xf86.h"
|
||||||
#include "vidmodeproc.h"
|
#include "vidmodeproc.h"
|
||||||
#include "globals.h"
|
#include "globals.h"
|
||||||
|
#include "protocol-versions.h"
|
||||||
|
|
||||||
#define DEFAULT_XF86VIDMODE_VERBOSITY 3
|
#define DEFAULT_XF86VIDMODE_VERBOSITY 3
|
||||||
|
|
||||||
|
@ -384,8 +385,8 @@ ProcXF86VidModeQueryVersion(ClientPtr client)
|
||||||
rep.type = X_Reply;
|
rep.type = X_Reply;
|
||||||
rep.length = 0;
|
rep.length = 0;
|
||||||
rep.sequenceNumber = client->sequence;
|
rep.sequenceNumber = client->sequence;
|
||||||
rep.majorVersion = XF86VIDMODE_MAJOR_VERSION;
|
rep.majorVersion = SERVER_XF86VIDMODE_MAJOR_VERSION;
|
||||||
rep.minorVersion = XF86VIDMODE_MINOR_VERSION;
|
rep.minorVersion = SERVER_XF86VIDMODE_MINOR_VERSION;
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps(&rep.sequenceNumber, n);
|
swaps(&rep.sequenceNumber, n);
|
||||||
swapl(&rep.length, n);
|
swapl(&rep.length, n);
|
||||||
|
|
|
@ -60,6 +60,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
#include "dristruct.h"
|
#include "dristruct.h"
|
||||||
#include "xf86.h"
|
#include "xf86.h"
|
||||||
#include "xf86drm.h"
|
#include "xf86drm.h"
|
||||||
|
#include "protocol-versions.h"
|
||||||
|
|
||||||
static int DRIErrorBase;
|
static int DRIErrorBase;
|
||||||
|
|
||||||
|
@ -134,9 +135,9 @@ ProcXF86DRIQueryVersion(
|
||||||
rep.type = X_Reply;
|
rep.type = X_Reply;
|
||||||
rep.length = 0;
|
rep.length = 0;
|
||||||
rep.sequenceNumber = client->sequence;
|
rep.sequenceNumber = client->sequence;
|
||||||
rep.majorVersion = XF86DRI_MAJOR_VERSION;
|
rep.majorVersion = SERVER_XF86DRI_MAJOR_VERSION;
|
||||||
rep.minorVersion = XF86DRI_MINOR_VERSION;
|
rep.minorVersion = SERVER_XF86DRI_MINOR_VERSION;
|
||||||
rep.patchVersion = XF86DRI_PATCH_VERSION;
|
rep.patchVersion = SERVER_XF86DRI_PATCH_VERSION;
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps(&rep.sequenceNumber, n);
|
swaps(&rep.sequenceNumber, n);
|
||||||
swapl(&rep.length, n);
|
swapl(&rep.length, n);
|
||||||
|
|
|
@ -45,6 +45,7 @@
|
||||||
#include "xf86drm.h"
|
#include "xf86drm.h"
|
||||||
#include "xfixes.h"
|
#include "xfixes.h"
|
||||||
#include "dri2.h"
|
#include "dri2.h"
|
||||||
|
#include "protocol-versions.h"
|
||||||
|
|
||||||
/* The only xf86 include */
|
/* The only xf86 include */
|
||||||
#include "xf86Module.h"
|
#include "xf86Module.h"
|
||||||
|
@ -79,8 +80,8 @@ ProcDRI2QueryVersion(ClientPtr client)
|
||||||
rep.type = X_Reply;
|
rep.type = X_Reply;
|
||||||
rep.length = 0;
|
rep.length = 0;
|
||||||
rep.sequenceNumber = client->sequence;
|
rep.sequenceNumber = client->sequence;
|
||||||
rep.majorVersion = 1;
|
rep.majorVersion = SERVER_DRI2_MAJOR_VERSION;
|
||||||
rep.minorVersion = 1;
|
rep.minorVersion = SERVER_DRI2_MAJOR_VERSION;
|
||||||
|
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps(&rep.sequenceNumber, n);
|
swaps(&rep.sequenceNumber, n);
|
||||||
|
|
|
@ -50,6 +50,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
#include <X11/extensions/applewmproto.h>
|
#include <X11/extensions/applewmproto.h>
|
||||||
#include "applewmExt.h"
|
#include "applewmExt.h"
|
||||||
#include "X11Application.h"
|
#include "X11Application.h"
|
||||||
|
#include "protocol-versions.h"
|
||||||
|
|
||||||
#define DEFINE_ATOM_HELPER(func,atom_name) \
|
#define DEFINE_ATOM_HELPER(func,atom_name) \
|
||||||
static Atom func (void) { \
|
static Atom func (void) { \
|
||||||
|
@ -183,9 +184,9 @@ ProcAppleWMQueryVersion(
|
||||||
rep.type = X_Reply;
|
rep.type = X_Reply;
|
||||||
rep.length = 0;
|
rep.length = 0;
|
||||||
rep.sequenceNumber = client->sequence;
|
rep.sequenceNumber = client->sequence;
|
||||||
rep.majorVersion = APPLE_WM_MAJOR_VERSION;
|
rep.majorVersion = SERVER_APPLEWM_MAJOR_VERSION;
|
||||||
rep.minorVersion = APPLE_WM_MINOR_VERSION;
|
rep.minorVersion = SERVER_APPLEWM_MINOR_VERSION;
|
||||||
rep.patchVersion = APPLE_WM_PATCH_VERSION;
|
rep.patchVersion = SERVER_APPLEWM_PATCH_VERSION;
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps(&rep.sequenceNumber, n);
|
swaps(&rep.sequenceNumber, n);
|
||||||
swapl(&rep.length, n);
|
swapl(&rep.length, n);
|
||||||
|
|
|
@ -55,6 +55,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
#include "dristruct.h"
|
#include "dristruct.h"
|
||||||
#include "xpr.h"
|
#include "xpr.h"
|
||||||
#include "x-hash.h"
|
#include "x-hash.h"
|
||||||
|
#include "protocol-versions.h"
|
||||||
|
|
||||||
static int DRIErrorBase = 0;
|
static int DRIErrorBase = 0;
|
||||||
|
|
||||||
|
@ -119,9 +120,9 @@ ProcAppleDRIQueryVersion(
|
||||||
rep.type = X_Reply;
|
rep.type = X_Reply;
|
||||||
rep.length = 0;
|
rep.length = 0;
|
||||||
rep.sequenceNumber = client->sequence;
|
rep.sequenceNumber = client->sequence;
|
||||||
rep.majorVersion = APPLE_DRI_MAJOR_VERSION;
|
rep.majorVersion = SERVER_APPLEDRI_MAJOR_VERSION;
|
||||||
rep.minorVersion = APPLE_DRI_MINOR_VERSION;
|
rep.minorVersion = SERVER_APPLEDRI_MINOR_VERSION;
|
||||||
rep.patchVersion = APPLE_DRI_PATCH_VERSION;
|
rep.patchVersion = SERVER_APPLEDRI_PATCH_VERSION;
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps(&rep.sequenceNumber, n);
|
swaps(&rep.sequenceNumber, n);
|
||||||
swapl(&rep.length, n);
|
swapl(&rep.length, n);
|
||||||
|
|
|
@ -41,6 +41,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
#include "swaprep.h"
|
#include "swaprep.h"
|
||||||
#define _WINDOWSWM_SERVER_
|
#define _WINDOWSWM_SERVER_
|
||||||
#include <X11/extensions/windowswmstr.h>
|
#include <X11/extensions/windowswmstr.h>
|
||||||
|
#include "protocol-versions.h"
|
||||||
|
|
||||||
static int WMErrorBase;
|
static int WMErrorBase;
|
||||||
|
|
||||||
|
@ -114,9 +115,9 @@ ProcWindowsWMQueryVersion(register ClientPtr client)
|
||||||
rep.type = X_Reply;
|
rep.type = X_Reply;
|
||||||
rep.length = 0;
|
rep.length = 0;
|
||||||
rep.sequenceNumber = client->sequence;
|
rep.sequenceNumber = client->sequence;
|
||||||
rep.majorVersion = WINDOWS_WM_MAJOR_VERSION;
|
rep.majorVersion = SERVER_WINDOWSWM_MAJOR_VERSION;
|
||||||
rep.minorVersion = WINDOWS_WM_MINOR_VERSION;
|
rep.minorVersion = SERVER_WINDOWSWM_MINOR_VERSION;
|
||||||
rep.patchVersion = WINDOWS_WM_PATCH_VERSION;
|
rep.patchVersion = SERVER_WINDOWSWM_PATCH_VERSION;
|
||||||
if (client->swapped)
|
if (client->swapped)
|
||||||
{
|
{
|
||||||
swaps(&rep.sequenceNumber, n);
|
swaps(&rep.sequenceNumber, n);
|
||||||
|
|
|
@ -65,4 +65,5 @@ AM_CFLAGS = $(DIX_CFLAGS)
|
||||||
|
|
||||||
EXTRA_DIST = \
|
EXTRA_DIST = \
|
||||||
dix-config-apple-verbatim.h \
|
dix-config-apple-verbatim.h \
|
||||||
eventconvert.h eventstr.h
|
eventconvert.h eventstr.h \
|
||||||
|
protocol-versions.h
|
||||||
|
|
148
include/protocol-versions.h
Normal file
148
include/protocol-versions.h
Normal file
|
@ -0,0 +1,148 @@
|
||||||
|
/*
|
||||||
|
* Copyright © 2009 Red Hat, Inc.
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
|
* copy of this software and associated documentation files (the "Software"),
|
||||||
|
* to deal in the Software without restriction, including without limitation
|
||||||
|
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||||
|
* and/or sell copies of the Software, and to permit persons to whom the
|
||||||
|
* Software is furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice (including the next
|
||||||
|
* paragraph) shall be included in all copies or substantial portions of the
|
||||||
|
* Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||||
|
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||||
|
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
* DEALINGS IN THE SOFTWARE.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This file specifies the server-supported protocol versions.
|
||||||
|
*/
|
||||||
|
#ifndef _PROTOCOL_VERSIONS_
|
||||||
|
#define _PROTOCOL_VERSIONS_
|
||||||
|
|
||||||
|
/* Apple DRI */
|
||||||
|
#define SERVER_APPLEDRI_MAJOR_VERSION 1
|
||||||
|
#define SERVER_APPLEDRI_MINOR_VERSION 0
|
||||||
|
#define SERVER_APPLEDRI_PATCH_VERSION 0
|
||||||
|
|
||||||
|
/* AppleWM */
|
||||||
|
#define SERVER_APPLEWM_MAJOR_VERSION 1
|
||||||
|
#define SERVER_APPLEWM_MINOR_VERSION 3
|
||||||
|
#define SERVER_APPLEWM_PATCH_VERSION 0
|
||||||
|
|
||||||
|
/* Composite */
|
||||||
|
#define SERVER_COMPOSITE_MAJOR_VERSION 0
|
||||||
|
#define SERVER_COMPOSITE_MINOR_VERSION 4
|
||||||
|
|
||||||
|
/* Damage */
|
||||||
|
#define SERVER_DAMAGE_MAJOR_VERSION 1
|
||||||
|
#define SERVER_DAMAGE_MINOR_VERSION 1
|
||||||
|
|
||||||
|
/* DMX */
|
||||||
|
#define SERVER_DMX_MAJOR_VERSION 2
|
||||||
|
#define SERVER_DMX_MINOR_VERSION 2
|
||||||
|
#define SERVER_DMX_PATCH_VERSION 20040604
|
||||||
|
|
||||||
|
/* DRI2 */
|
||||||
|
#define SERVER_DRI2_MAJOR_VERSION 1
|
||||||
|
#define SERVER_DRI2_MINOR_VERSION 1
|
||||||
|
|
||||||
|
/* Generic event extension */
|
||||||
|
#define SERVER_GE_MAJOR_VERSION 1
|
||||||
|
#define SERVER_GE_MINOR_VERSION 0
|
||||||
|
|
||||||
|
/* GLX */
|
||||||
|
#define SERVER_GLX_MAJOR_VERSION 1
|
||||||
|
#define SERVER_GLX_MINOR_VERSION 2
|
||||||
|
|
||||||
|
/* Xinerama */
|
||||||
|
#define SERVER_PANORAMIX_MAJOR_VERSION 1
|
||||||
|
#define SERVER_PANORAMIX_MINOR_VERSION 1
|
||||||
|
|
||||||
|
/* RandR */
|
||||||
|
#define SERVER_RANDR_MAJOR_VERSION 1
|
||||||
|
#define SERVER_RANDR_MINOR_VERSION 3
|
||||||
|
|
||||||
|
/* Record */
|
||||||
|
#define SERVER_RECORD_MAJOR_VERSION 1
|
||||||
|
#define SERVER_RECORD_MINOR_VERSION 13
|
||||||
|
|
||||||
|
/* Render */
|
||||||
|
#define SERVER_RENDER_MAJOR_VERSION 0
|
||||||
|
#define SERVER_RENDER_MINOR_VERSION 10
|
||||||
|
|
||||||
|
/* RandR Xinerama */
|
||||||
|
#define SERVER_RRXINERAMA_MAJOR_VERSION 1
|
||||||
|
#define SERVER_RRXINERAMA_MINOR_VERSION 1
|
||||||
|
|
||||||
|
/* Screensaver */
|
||||||
|
#define SERVER_SAVER_MAJOR_VERSION 1
|
||||||
|
#define SERVER_SAVER_MINOR_VERSION 1
|
||||||
|
|
||||||
|
/* Security */
|
||||||
|
#define SERVER_SECURITY_MAJOR_VERSION 1
|
||||||
|
#define SERVER_SECURITY_MINOR_VERSION 0
|
||||||
|
|
||||||
|
/* Shape */
|
||||||
|
#define SERVER_SHAPE_MAJOR_VERSION 1
|
||||||
|
#define SERVER_SHAPE_MINOR_VERSION 1
|
||||||
|
|
||||||
|
/* SHM */
|
||||||
|
#define SERVER_SHM_MAJOR_VERSION 1
|
||||||
|
#define SERVER_SHM_MINOR_VERSION 1
|
||||||
|
|
||||||
|
/* Windows WM */
|
||||||
|
#define SERVER_WINDOWSWM_MAJOR_VERSION 1
|
||||||
|
#define SERVER_WINDOWSWM_MINOR_VERSION 0
|
||||||
|
#define SERVER_WINDOWSWM_PATCH_VERSION 0
|
||||||
|
|
||||||
|
/* Xcalibrate */
|
||||||
|
#define SERVER_XCALIBRATE_MAJOR_VERSION 0
|
||||||
|
#define SERVER_XCALIBRATE_MINOR_VERSION 1
|
||||||
|
|
||||||
|
/* DGA */
|
||||||
|
#define SERVER_XDGA_MAJOR_VERSION 2
|
||||||
|
#define SERVER_XDGA_MINOR_VERSION 0
|
||||||
|
|
||||||
|
/* Big Font */
|
||||||
|
#define SERVER_XF86BIGFONT_MAJOR_VERSION 1
|
||||||
|
#define SERVER_XF86BIGFONT_MINOR_VERSION 1
|
||||||
|
|
||||||
|
/* DRI */
|
||||||
|
#define SERVER_XF86DRI_MAJOR_VERSION 4
|
||||||
|
#define SERVER_XF86DRI_MINOR_VERSION 1
|
||||||
|
#define SERVER_XF86DRI_PATCH_VERSION 20040604
|
||||||
|
|
||||||
|
/* Vidmode */
|
||||||
|
#define SERVER_XF86VIDMODE_MAJOR_VERSION 2
|
||||||
|
#define SERVER_XF86VIDMODE_MINOR_VERSION 2
|
||||||
|
|
||||||
|
/* Fixes */
|
||||||
|
#define SERVER_XFIXES_MAJOR_VERSION 4
|
||||||
|
#define SERVER_XFIXES_MINOR_VERSION 0
|
||||||
|
|
||||||
|
/* X Input */
|
||||||
|
#define SERVER_XI_MAJOR_VERSION 2
|
||||||
|
#define SERVER_XI_MINOR_VERSION 0
|
||||||
|
|
||||||
|
/* XKB */
|
||||||
|
#define SERVER_XKB_MAJOR_VERSION 1
|
||||||
|
#define SERVER_XKB_MINOR_VERSION 0
|
||||||
|
|
||||||
|
/* Resource */
|
||||||
|
#define SERVER_XRES_MAJOR_VERSION 1
|
||||||
|
#define SERVER_XRES_MINOR_VERSION 0
|
||||||
|
|
||||||
|
/* XvMC */
|
||||||
|
#define SERVER_XVMC_MAJOR_VERSION 1
|
||||||
|
#define SERVER_XVMC_MINOR_VERSION 1
|
||||||
|
|
||||||
|
#endif
|
|
@ -21,9 +21,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "randrstr.h"
|
#include "randrstr.h"
|
||||||
|
#include "protocol-versions.h"
|
||||||
#define SERVER_RANDR_MAJOR 1
|
|
||||||
#define SERVER_RANDR_MINOR 3
|
|
||||||
|
|
||||||
Bool
|
Bool
|
||||||
RRClientKnowsRates (ClientPtr pClient)
|
RRClientKnowsRates (ClientPtr pClient)
|
||||||
|
@ -50,14 +48,14 @@ ProcRRQueryVersion (ClientPtr client)
|
||||||
rep.sequenceNumber = client->sequence;
|
rep.sequenceNumber = client->sequence;
|
||||||
|
|
||||||
if ((stuff->majorVersion * 1000 + stuff->minorVersion) <
|
if ((stuff->majorVersion * 1000 + stuff->minorVersion) <
|
||||||
(SERVER_RANDR_MAJOR * 1000 + SERVER_RANDR_MINOR))
|
(SERVER_RANDR_MAJOR_VERSION * 1000 + SERVER_RANDR_MINOR_VERSION))
|
||||||
{
|
{
|
||||||
rep.majorVersion = stuff->majorVersion;
|
rep.majorVersion = stuff->majorVersion;
|
||||||
rep.minorVersion = stuff->minorVersion;
|
rep.minorVersion = stuff->minorVersion;
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
rep.majorVersion = SERVER_RANDR_MAJOR;
|
rep.majorVersion = SERVER_RANDR_MAJOR_VERSION;
|
||||||
rep.minorVersion = SERVER_RANDR_MINOR;
|
rep.minorVersion = SERVER_RANDR_MINOR_VERSION;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
|
|
|
@ -71,9 +71,7 @@
|
||||||
#include "randrstr.h"
|
#include "randrstr.h"
|
||||||
#include "swaprep.h"
|
#include "swaprep.h"
|
||||||
#include <X11/extensions/panoramiXproto.h>
|
#include <X11/extensions/panoramiXproto.h>
|
||||||
|
#include "protocol-versions.h"
|
||||||
#define RR_XINERAMA_MAJOR_VERSION 1
|
|
||||||
#define RR_XINERAMA_MINOR_VERSION 1
|
|
||||||
|
|
||||||
/* Xinerama is not multi-screen capable; just report about screen 0 */
|
/* Xinerama is not multi-screen capable; just report about screen 0 */
|
||||||
#define RR_XINERAMA_SCREEN 0
|
#define RR_XINERAMA_SCREEN 0
|
||||||
|
@ -98,8 +96,8 @@ ProcRRXineramaQueryVersion(ClientPtr client)
|
||||||
rep.type = X_Reply;
|
rep.type = X_Reply;
|
||||||
rep.length = 0;
|
rep.length = 0;
|
||||||
rep.sequenceNumber = client->sequence;
|
rep.sequenceNumber = client->sequence;
|
||||||
rep.majorVersion = RR_XINERAMA_MAJOR_VERSION;
|
rep.majorVersion = SERVER_RRXINERAMA_MAJOR_VERSION;
|
||||||
rep.minorVersion = RR_XINERAMA_MINOR_VERSION;
|
rep.minorVersion = SERVER_RRXINERAMA_MINOR_VERSION;
|
||||||
if(client->swapped) {
|
if(client->swapped) {
|
||||||
swaps(&rep.sequenceNumber, n);
|
swaps(&rep.sequenceNumber, n);
|
||||||
swapl(&rep.length, n);
|
swapl(&rep.length, n);
|
||||||
|
|
|
@ -53,6 +53,8 @@ and Jim Haggerty of Metheus.
|
||||||
#include "cursor.h"
|
#include "cursor.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "protocol-versions.h"
|
||||||
|
|
||||||
static RESTYPE RTContext; /* internal resource type for Record contexts */
|
static RESTYPE RTContext; /* internal resource type for Record contexts */
|
||||||
static int RecordErrorBase; /* first Record error number */
|
static int RecordErrorBase; /* first Record error number */
|
||||||
|
|
||||||
|
@ -1866,8 +1868,8 @@ ProcRecordQueryVersion(ClientPtr client)
|
||||||
rep.type = X_Reply;
|
rep.type = X_Reply;
|
||||||
rep.sequenceNumber = client->sequence;
|
rep.sequenceNumber = client->sequence;
|
||||||
rep.length = 0;
|
rep.length = 0;
|
||||||
rep.majorVersion = RECORD_MAJOR_VERSION;
|
rep.majorVersion = SERVER_RECORD_MAJOR_VERSION;
|
||||||
rep.minorVersion = RECORD_MINOR_VERSION;
|
rep.minorVersion = SERVER_RECORD_MINOR_VERSION;
|
||||||
if(client->swapped)
|
if(client->swapped)
|
||||||
{
|
{
|
||||||
swaps(&rep.sequenceNumber, n);
|
swaps(&rep.sequenceNumber, n);
|
||||||
|
|
|
@ -45,6 +45,7 @@
|
||||||
#include <X11/Xfuncproto.h>
|
#include <X11/Xfuncproto.h>
|
||||||
#include "cursorstr.h"
|
#include "cursorstr.h"
|
||||||
#include "xace.h"
|
#include "xace.h"
|
||||||
|
#include "protocol-versions.h"
|
||||||
|
|
||||||
#if HAVE_STDINT_H
|
#if HAVE_STDINT_H
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
@ -272,14 +273,14 @@ ProcRenderQueryVersion (ClientPtr client)
|
||||||
rep.sequenceNumber = client->sequence;
|
rep.sequenceNumber = client->sequence;
|
||||||
|
|
||||||
if ((stuff->majorVersion * 1000 + stuff->minorVersion) <
|
if ((stuff->majorVersion * 1000 + stuff->minorVersion) <
|
||||||
(RENDER_MAJOR * 1000 + RENDER_MINOR))
|
(SERVER_RENDER_MAJOR_VERSION * 1000 + SERVER_RENDER_MINOR_VERSION))
|
||||||
{
|
{
|
||||||
rep.majorVersion = stuff->majorVersion;
|
rep.majorVersion = stuff->majorVersion;
|
||||||
rep.minorVersion = stuff->minorVersion;
|
rep.minorVersion = stuff->minorVersion;
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
rep.majorVersion = RENDER_MAJOR;
|
rep.majorVersion = SERVER_RENDER_MAJOR_VERSION;
|
||||||
rep.minorVersion = RENDER_MINOR;
|
rep.minorVersion = SERVER_RENDER_MINOR_VERSION;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
|
|
|
@ -52,13 +52,11 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "xfixesint.h"
|
#include "xfixesint.h"
|
||||||
|
#include "protocol-versions.h"
|
||||||
/*
|
/*
|
||||||
* Must use these instead of the constants from xfixeswire.h. They advertise
|
* Must use these instead of the constants from xfixeswire.h. They advertise
|
||||||
* what we implement, not what the protocol headers define.
|
* what we implement, not what the protocol headers define.
|
||||||
*/
|
*/
|
||||||
#define SERVER_XFIXES_MAJOR 4
|
|
||||||
#define SERVER_XFIXES_MINOR 0
|
|
||||||
|
|
||||||
static unsigned char XFixesReqCode;
|
static unsigned char XFixesReqCode;
|
||||||
int XFixesEventBase;
|
int XFixesEventBase;
|
||||||
|
@ -80,16 +78,16 @@ ProcXFixesQueryVersion(ClientPtr client)
|
||||||
rep.type = X_Reply;
|
rep.type = X_Reply;
|
||||||
rep.length = 0;
|
rep.length = 0;
|
||||||
rep.sequenceNumber = client->sequence;
|
rep.sequenceNumber = client->sequence;
|
||||||
if (stuff->majorVersion < SERVER_XFIXES_MAJOR) {
|
if (stuff->majorVersion < SERVER_XFIXES_MAJOR_VERSION) {
|
||||||
rep.majorVersion = stuff->majorVersion;
|
rep.majorVersion = stuff->majorVersion;
|
||||||
rep.minorVersion = stuff->minorVersion;
|
rep.minorVersion = stuff->minorVersion;
|
||||||
} else {
|
} else {
|
||||||
rep.majorVersion = SERVER_XFIXES_MAJOR;
|
rep.majorVersion = SERVER_XFIXES_MAJOR_VERSION;
|
||||||
if (stuff->majorVersion == SERVER_XFIXES_MAJOR &&
|
if (stuff->majorVersion == SERVER_XFIXES_MAJOR_VERSION &&
|
||||||
stuff->minorVersion < SERVER_XFIXES_MINOR)
|
stuff->minorVersion < SERVER_XFIXES_MINOR_VERSION)
|
||||||
rep.minorVersion = stuff->minorVersion;
|
rep.minorVersion = stuff->minorVersion;
|
||||||
else
|
else
|
||||||
rep.minorVersion = SERVER_XFIXES_MINOR;
|
rep.minorVersion = SERVER_XFIXES_MINOR_VERSION;
|
||||||
}
|
}
|
||||||
pXFixesClient->major_version = rep.majorVersion;
|
pXFixesClient->major_version = rep.majorVersion;
|
||||||
pXFixesClient->minor_version = rep.minorVersion;
|
pXFixesClient->minor_version = rep.minorVersion;
|
||||||
|
|
11
xkb/xkb.c
11
xkb/xkb.c
|
@ -38,6 +38,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
#include "extnsionst.h"
|
#include "extnsionst.h"
|
||||||
#include "xace.h"
|
#include "xace.h"
|
||||||
#include "xkb.h"
|
#include "xkb.h"
|
||||||
|
#include "protocol-versions.h"
|
||||||
|
|
||||||
#include <X11/extensions/XI.h>
|
#include <X11/extensions/XI.h>
|
||||||
#include <X11/extensions/XKMformat.h>
|
#include <X11/extensions/XKMformat.h>
|
||||||
|
@ -161,9 +162,9 @@ ProcXkbUseExtension(ClientPtr client)
|
||||||
int supported;
|
int supported;
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xkbUseExtensionReq);
|
REQUEST_SIZE_MATCH(xkbUseExtensionReq);
|
||||||
if (stuff->wantedMajor != XkbMajorVersion) {
|
if (stuff->wantedMajor != SERVER_XKB_MAJOR_VERSION) {
|
||||||
/* pre-release version 0.65 is compatible with 1.00 */
|
/* pre-release version 0.65 is compatible with 1.00 */
|
||||||
supported= ((XkbMajorVersion==1)&&
|
supported= ((SERVER_XKB_MAJOR_VERSION==1)&&
|
||||||
(stuff->wantedMajor==0)&&(stuff->wantedMinor==65));
|
(stuff->wantedMajor==0)&&(stuff->wantedMinor==65));
|
||||||
}
|
}
|
||||||
else supported = 1;
|
else supported = 1;
|
||||||
|
@ -178,15 +179,15 @@ ProcXkbUseExtension(ClientPtr client)
|
||||||
client->index,
|
client->index,
|
||||||
(long)client->clientAsMask,
|
(long)client->clientAsMask,
|
||||||
stuff->wantedMajor,stuff->wantedMinor,
|
stuff->wantedMajor,stuff->wantedMinor,
|
||||||
XkbMajorVersion,XkbMinorVersion);
|
SERVER_XKB_MAJOR_VERSION,SERVER_XKB_MINOR_VERSION);
|
||||||
}
|
}
|
||||||
memset(&rep, 0, sizeof(xkbUseExtensionReply));
|
memset(&rep, 0, sizeof(xkbUseExtensionReply));
|
||||||
rep.type = X_Reply;
|
rep.type = X_Reply;
|
||||||
rep.supported = supported;
|
rep.supported = supported;
|
||||||
rep.length = 0;
|
rep.length = 0;
|
||||||
rep.sequenceNumber = client->sequence;
|
rep.sequenceNumber = client->sequence;
|
||||||
rep.serverMajor = XkbMajorVersion;
|
rep.serverMajor = SERVER_XKB_MAJOR_VERSION;
|
||||||
rep.serverMinor = XkbMinorVersion;
|
rep.serverMinor = SERVER_XKB_MINOR_VERSION;
|
||||||
if ( client->swapped ) {
|
if ( client->swapped ) {
|
||||||
swaps(&rep.sequenceNumber, n);
|
swaps(&rep.sequenceNumber, n);
|
||||||
swaps(&rep.serverMajor, n);
|
swaps(&rep.serverMajor, n);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user