diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2016-06-28 12:07:10 +0200 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2016-07-02 13:51:37 +0200 |
commit | 487870fff5cd1bc3db5ade4f5721f483f96119c7 (patch) | |
tree | e41ad6d5cd85b97101c9fd3d37be951eee1a409e /nx-X11 | |
parent | a08e2323e838099cc2079287c5b3fd1e9b7f20f7 (diff) | |
download | nx-libs-487870fff5cd1bc3db5ade4f5721f483f96119c7.tar.gz nx-libs-487870fff5cd1bc3db5ade4f5721f483f96119c7.tar.bz2 nx-libs-487870fff5cd1bc3db5ade4f5721f483f96119c7.zip |
Xserver/include/protocol-versions.h: Switch to having an Xserver-specific header file containing all use protocol versions.
Diffstat (limited to 'nx-X11')
21 files changed, 257 insertions, 75 deletions
diff --git a/nx-X11/programs/Xserver/GL/glx/glxserver.h b/nx-X11/programs/Xserver/GL/glx/glxserver.h index 4238de537..a04d361fd 100644 --- a/nx-X11/programs/Xserver/GL/glx/glxserver.h +++ b/nx-X11/programs/Xserver/GL/glx/glxserver.h @@ -52,7 +52,7 @@ #include <resource.h> #include <scrnintstr.h> #include "GL/glx_ansic.h" - +#include "protocol-versions.h" #include <limits.h> /* @@ -75,8 +75,8 @@ typedef struct __GLXdrawablePrivateRec __GLXdrawablePrivate; #include "glxerror.h" -#define GLX_SERVER_MAJOR_VERSION 1 -#define GLX_SERVER_MINOR_VERSION 2 +#define GLX_SERVER_MAJOR_VERSION SERVER_GLX_MAJOR_VERSION +#define GLX_SERVER_MINOR_VERSION SERVER_GLX_MINOR_VERSION #ifndef True #define True 1 diff --git a/nx-X11/programs/Xserver/Xext/panoramiX.c b/nx-X11/programs/Xserver/Xext/panoramiX.c index 9c5eefe4a..a1bfa91d6 100644 --- a/nx-X11/programs/Xserver/Xext/panoramiX.c +++ b/nx-X11/programs/Xserver/Xext/panoramiX.c @@ -59,7 +59,7 @@ Equipment Corporation. #include "picturestr.h" #endif #include "modinit.h" - +#include "protocol-versions.h" #ifdef GLXPROXY extern VisualPtr glxMatchVisual(ScreenPtr pScreen, @@ -942,8 +942,8 @@ ProcPanoramiXQueryVersion (ClientPtr client) rep.type = X_Reply; rep.length = 0; rep.sequenceNumber = client->sequence; - rep.majorVersion = PANORAMIX_MAJOR_VERSION; - rep.minorVersion = PANORAMIX_MINOR_VERSION; + rep.majorVersion = SERVER_PANORAMIX_MAJOR_VERSION; + rep.minorVersion = SERVER_PANORAMIX_MINOR_VERSION; if (client->swapped) { swaps(&rep.sequenceNumber, n); swapl(&rep.length, n); diff --git a/nx-X11/programs/Xserver/Xext/saver.c b/nx-X11/programs/Xserver/Xext/saver.c index a871be9b7..81f502189 100644 --- a/nx-X11/programs/Xserver/Xext/saver.c +++ b/nx-X11/programs/Xserver/Xext/saver.c @@ -65,6 +65,8 @@ in this Software without prior written authorization from the X Consortium. #include "modinit.h" +#include "protocol-versions.h" + #if 0 static unsigned char ScreenSaverReqCode = 0; #endif @@ -699,8 +701,8 @@ ProcScreenSaverQueryVersion (client) rep.type = X_Reply; rep.length = 0; rep.sequenceNumber = client->sequence; - rep.majorVersion = ScreenSaverMajorVersion; - rep.minorVersion = ScreenSaverMinorVersion; + rep.majorVersion = SERVER_SAVER_MAJOR_VERSION; + rep.minorVersion = SERVER_SAVER_MINOR_VERSION; if (client->swapped) { swaps(&rep.sequenceNumber, n); swapl(&rep.length, n); diff --git a/nx-X11/programs/Xserver/Xext/security.c b/nx-X11/programs/Xserver/Xext/security.c index 13da54386..096b88d20 100644 --- a/nx-X11/programs/Xserver/Xext/security.c +++ b/nx-X11/programs/Xserver/Xext/security.c @@ -56,6 +56,7 @@ in this Software without prior written authorization from The Open Group. #include "gcstruct.h" #include "colormapst.h" #include "propertyst.h" +#include "protocol-versions.h" #define _SECURITY_SERVER #include <nx-X11/extensions/securstr.h> #include <assert.h> @@ -486,8 +487,8 @@ ProcSecurityQueryVersion( rep.type = X_Reply; rep.sequenceNumber = client->sequence; rep.length = 0; - rep.majorVersion = SECURITY_MAJOR_VERSION; - rep.minorVersion = SECURITY_MINOR_VERSION; + rep.majorVersion = SERVER_SECURITY_MAJOR_VERSION; + rep.minorVersion = SERVER_SECURITY_MINOR_VERSION; if(client->swapped) { register char n; diff --git a/nx-X11/programs/Xserver/Xext/shape.c b/nx-X11/programs/Xserver/Xext/shape.c index 51fcd7d9f..b272f1bbe 100644 --- a/nx-X11/programs/Xserver/Xext/shape.c +++ b/nx-X11/programs/Xserver/Xext/shape.c @@ -45,6 +45,7 @@ in this Software without prior written authorization from The Open Group. #include "resource.h" #include "opaque.h" #include <X11/extensions/shapeproto.h> +#include "protocol-versions.h" #include "regionstr.h" #include "gcstruct.h" #ifdef EXTMODULE @@ -295,8 +296,8 @@ ProcShapeQueryVersion (client) rep.type = X_Reply; rep.length = 0; rep.sequenceNumber = client->sequence; - rep.majorVersion = SHAPE_MAJOR_VERSION; - rep.minorVersion = SHAPE_MINOR_VERSION; + rep.majorVersion = SERVER_SHAPE_MAJOR_VERSION; + rep.minorVersion = SERVER_SHAPE_MINOR_VERSION; if (client->swapped) { swaps(&rep.sequenceNumber, n); swapl(&rep.length, n); diff --git a/nx-X11/programs/Xserver/Xext/shm.c b/nx-X11/programs/Xserver/Xext/shm.c index bca8c2e0e..83d6eaaab 100644 --- a/nx-X11/programs/Xserver/Xext/shm.c +++ b/nx-X11/programs/Xserver/Xext/shm.c @@ -65,6 +65,7 @@ in this Software without prior written authorization from The Open Group. #ifdef EXTMODULE #include "xf86_ansic.h" #endif +#include "protocol-versions.h" #ifdef PANORAMIX #include "panoramiX.h" @@ -354,8 +355,8 @@ ProcShmQueryVersion(client) rep.sequenceNumber = client->sequence; rep.sharedPixmaps = sharedPixmaps; rep.pixmapFormat = pixmapFormat; - rep.majorVersion = SHM_MAJOR_VERSION; - rep.minorVersion = SHM_MINOR_VERSION; + rep.majorVersion = SERVER_SHM_MAJOR_VERSION; + rep.minorVersion = SERVER_SHM_MINOR_VERSION; rep.uid = geteuid(); rep.gid = getegid(); if (client->swapped) { diff --git a/nx-X11/programs/Xserver/Xext/sync.c b/nx-X11/programs/Xserver/Xext/sync.c index c122e2860..f79cc1b23 100644 --- a/nx-X11/programs/Xserver/Xext/sync.c +++ b/nx-X11/programs/Xserver/Xext/sync.c @@ -70,6 +70,7 @@ PERFORMANCE OF THIS SOFTWARE. #define _SYNC_SERVER #include <nx-X11/extensions/sync.h> #include <nx-X11/extensions/syncstr.h> +#include "protocol-versions.h" #ifdef EXTMODULE #include "xf86_ansic.h" @@ -1349,8 +1350,8 @@ ProcSyncInitialize(client) memset(&rep, 0, sizeof(xSyncInitializeReply)); rep.type = X_Reply; rep.sequenceNumber = client->sequence; - rep.majorVersion = SYNC_MAJOR_VERSION; - rep.minorVersion = SYNC_MINOR_VERSION; + rep.majorVersion = SERVER_SYNC_MAJOR_VERSION; + rep.minorVersion = SERVER_SYNC_MINOR_VERSION; rep.length = 0; if (client->swapped) diff --git a/nx-X11/programs/Xserver/Xext/xf86bigfont.c b/nx-X11/programs/Xserver/Xext/xf86bigfont.c index c0cc7f938..848f0114b 100644 --- a/nx-X11/programs/Xserver/Xext/xf86bigfont.c +++ b/nx-X11/programs/Xserver/Xext/xf86bigfont.c @@ -72,6 +72,7 @@ #include "gcstruct.h" #include "dixfontstr.h" #include "extnsionst.h" +#include "protocol-versions.h" #define _XF86BIGFONT_SERVER_ #include <nx-X11/extensions/xf86bigfstr.h> @@ -357,8 +358,8 @@ ProcXF86BigfontQueryVersion( reply.type = X_Reply; reply.length = 0; reply.sequenceNumber = client->sequence; - reply.majorVersion = XF86BIGFONT_MAJOR_VERSION; - reply.minorVersion = XF86BIGFONT_MINOR_VERSION; + reply.majorVersion = SERVER_XF86BIGFONT_MAJOR_VERSION; + reply.minorVersion = SERVER_XF86BIGFONT_MINOR_VERSION; reply.uid = geteuid(); reply.gid = getegid(); #ifdef HAS_SHM diff --git a/nx-X11/programs/Xserver/Xext/xres.c b/nx-X11/programs/Xserver/Xext/xres.c index 7b3555452..3d5ae162c 100644 --- a/nx-X11/programs/Xserver/Xext/xres.c +++ b/nx-X11/programs/Xserver/Xext/xres.c @@ -20,6 +20,7 @@ #include <nx-X11/extensions/XResproto.h> #include "pixmapstr.h" #include "modinit.h" +#include "protocol-versions.h" static int ProcXResQueryVersion (ClientPtr client) @@ -38,8 +39,8 @@ ProcXResQueryVersion (ClientPtr client) rep.type = X_Reply; rep.length = 0; rep.sequenceNumber = client->sequence; - rep.server_major = XRES_MAJOR_VERSION; - rep.server_minor = XRES_MINOR_VERSION; + rep.server_major = SERVER_XRES_MAJOR_VERSION; + rep.server_minor = SERVER_XRES_MINOR_VERSION; if (client->swapped) { int n; swaps(&rep.sequenceNumber, n); diff --git a/nx-X11/programs/Xserver/Xi/extinit.c b/nx-X11/programs/Xserver/Xi/extinit.c index 750fa46cb..81f5ca551 100644 --- a/nx-X11/programs/Xserver/Xi/extinit.c +++ b/nx-X11/programs/Xserver/Xi/extinit.c @@ -74,6 +74,7 @@ SOFTWARE. #include "extinit.h" #include "exglobals.h" #include "swaprep.h" +#include "protocol-versions.h" /* modules local to Xi */ #include "allowev.h" @@ -204,8 +205,9 @@ Mask PropagateMask[MAX_DEVICES]; static XExtensionVersion thisversion = {XI_Present, - XI_Add_XChangeDeviceControl_Major, - XI_Add_XChangeDeviceControl_Minor}; + SERVER_XI_MAJOR_VERSION, + SERVER_XI_MINOR_VERSION, + }; /********************************************************************** * diff --git a/nx-X11/programs/Xserver/composite/compext.c b/nx-X11/programs/Xserver/composite/compext.c index d5f8fd6d4..dbde88625 100644 --- a/nx-X11/programs/Xserver/composite/compext.c +++ b/nx-X11/programs/Xserver/composite/compext.c @@ -29,16 +29,9 @@ #include "compint.h" #include "XI.h" #include "XIproto.h" +#include "protocol-versions.h" #include "extinit.h" -#ifndef SERVER_COMPOSITE_MAJOR_VERSION -#define SERVER_COMPOSITE_MAJOR_VERSION 0 -#endif - -#ifndef SERVER_COMPOSITE_MINOR_VERSION -#define SERVER_COMPOSITE_MINOR_VERSION 4 -#endif - static CARD8 CompositeReqCode; #ifndef NXAGENT_SERVER diff --git a/nx-X11/programs/Xserver/damageext/damageext.c b/nx-X11/programs/Xserver/damageext/damageext.c index 8d03dfed5..d14f14985 100755 --- a/nx-X11/programs/Xserver/damageext/damageext.c +++ b/nx-X11/programs/Xserver/damageext/damageext.c @@ -27,6 +27,7 @@ #endif #include "damageextint.h" +#include "protocol-versions.h" unsigned char DamageReqCode; int DamageEventBase; @@ -143,16 +144,16 @@ ProcDamageQueryVersion(ClientPtr client) rep.type = X_Reply; rep.length = 0; rep.sequenceNumber = client->sequence; - if (stuff->majorVersion < DAMAGE_MAJOR) { + if (stuff->majorVersion < SERVER_DAMAGE_MAJOR_VERSION) { rep.majorVersion = stuff->majorVersion; rep.minorVersion = stuff->minorVersion; } else { - rep.majorVersion = DAMAGE_MAJOR; - if (stuff->majorVersion == DAMAGE_MAJOR && - stuff->minorVersion < DAMAGE_MINOR) + rep.majorVersion = SERVER_DAMAGE_MAJOR_VERSION; + if (stuff->majorVersion == SERVER_DAMAGE_MAJOR_VERSION && + stuff->minorVersion < SERVER_DAMAGE_MINOR_VERSION) rep.minorVersion = stuff->minorVersion; else - rep.minorVersion = DAMAGE_MINOR; + rep.minorVersion = SERVER_DAMAGE_MINOR_VERSION; } pDamageClient->major_version = rep.majorVersion; pDamageClient->minor_version = rep.minorVersion; diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXshm.c b/nx-X11/programs/Xserver/hw/nxagent/NXshm.c index d2ff7fd8f..1ce72cbbe 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXshm.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXshm.c @@ -47,7 +47,6 @@ in this Software without prior written authorization from The Open Group. /* $Xorg: shm.c,v 1.4 2001/02/09 02:04:33 xorgcvs Exp $ */ #include <nx-X11/X.h> - #include "Trap.h" #include "Agent.h" diff --git a/nx-X11/programs/Xserver/hw/nxagent/Render.c b/nx-X11/programs/Xserver/hw/nxagent/Render.c index 866ab581c..8c822319d 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Render.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Render.c @@ -31,6 +31,7 @@ #include "mipict.h" #include "fbpict.h" #include "dixstruct.h" +#include "protocol-versions.h" #include "Agent.h" #include "Drawable.h" @@ -217,26 +218,26 @@ void nxagentRenderExtensionInit() + two versions. */ - if (major_version > RENDER_MAJOR || - (major_version == RENDER_MAJOR && - minor_version > RENDER_MINOR)) + if (major_version > SERVER_RENDER_MAJOR_VERSION || + (major_version == SERVER_RENDER_MAJOR_VERSION && + minor_version > SERVER_RENDER_MINOR_VERSION)) { #ifdef TEST fprintf(stderr, "nxagentRenderExtensionInit: Using render version [%d.%d] with " - "remote version [%d.%d].\n", RENDER_MAJOR, RENDER_MINOR, + "remote version [%d.%d].\n", SERVER_RENDER_MAJOR_VERSION, SERVER_RENDER_MINOR_VERSION, major_version, minor_version); #endif - nxagentRenderVersionMajor = RENDER_MAJOR; - nxagentRenderVersionMinor = RENDER_MINOR; + nxagentRenderVersionMajor = SERVER_RENDER_MAJOR_VERSION; + nxagentRenderVersionMinor = SERVER_RENDER_MINOR_VERSION; } - else if (major_version < RENDER_MAJOR || - (major_version == RENDER_MAJOR && - minor_version < RENDER_MINOR)) + else if (major_version < SERVER_RENDER_MAJOR_VERSION || + (major_version == SERVER_RENDER_MAJOR_VERSION && + minor_version < SERVER_RENDER_MINOR_VERSION)) { #ifdef TEST fprintf(stderr, "Info: Local render version %d.%d is higher " - "than remote version %d.%d.\n", RENDER_MAJOR, RENDER_MINOR, + "than remote version %d.%d.\n", SERVER_RENDER_MAJOR_VERSION, SERVER_RENDER_MINOR_VERSION, major_version, minor_version); fprintf(stderr, "Info: Lowering the render version reported to clients.\n"); @@ -249,7 +250,7 @@ void nxagentRenderExtensionInit() { #ifdef TEST fprintf(stderr, "nxagentRenderExtensionInit: Local render version %d.%d " - "matches remote version %d.%d.\n", RENDER_MAJOR, RENDER_MINOR, + "matches remote version %d.%d.\n", SERVER_RENDER_MAJOR_VERSION, SERVER_RENDER_MINOR_VERSION, major_version, minor_version); #endif diff --git a/nx-X11/programs/Xserver/include/protocol-versions.h b/nx-X11/programs/Xserver/include/protocol-versions.h new file mode 100644 index 000000000..9b9319fd2 --- /dev/null +++ b/nx-X11/programs/Xserver/include/protocol-versions.h @@ -0,0 +1,182 @@ +/* + * 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_H +#define PROTOCOL_VERSIONS_H + +#ifdef NXAGENT_SERVER +# define XTRANS_SEND_FDS 0 +#endif + +/* Composite */ +#define SERVER_COMPOSITE_MAJOR_VERSION 0 +#define SERVER_COMPOSITE_MINOR_VERSION 4 + +/* Damage */ +#define SERVER_DAMAGE_MAJOR_VERSION 1 +#ifndef NXAGENT_SERVER +#define SERVER_DAMAGE_MINOR_VERSION 1 +#else /* !defined(NXAGENT_SERVER) */ +#define SERVER_DAMAGE_MINOR_VERSION 0 +#endif /* !defined(NXAGENT_SERVER) */ + +#ifndef NXAGENT_SERVER +/* DRI3 */ +#define SERVER_DRI3_MAJOR_VERSION 1 +#define SERVER_DRI3_MINOR_VERSION 0 +#endif /* !defined(NXAGENT_SERVER) */ + +#ifndef NXAGENT_SERVER +/* DMX */ +#define SERVER_DMX_MAJOR_VERSION 2 +#define SERVER_DMX_MINOR_VERSION 2 +#define SERVER_DMX_PATCH_VERSION 20040604 +#endif /* !defined(NXAGENT_SERVER) */ + +#ifndef NXAGENT_SERVER +/* Generic event extension */ +#define SERVER_GE_MAJOR_VERSION 1 +#define SERVER_GE_MINOR_VERSION 0 +#endif /* !defined(NXAGENT_SERVER) */ + +/* GLX */ +#define SERVER_GLX_MAJOR_VERSION 1 +#ifndef NXAGENT_SERVER +#define SERVER_GLX_MINOR_VERSION 4 +#else +#define SERVER_GLX_MINOR_VERSION 2 +#endif + +/* Xinerama */ +#define SERVER_PANORAMIX_MAJOR_VERSION 1 +#define SERVER_PANORAMIX_MINOR_VERSION 1 + +#ifndef NXAGENT_SERVER +/* Present */ +#define SERVER_PRESENT_MAJOR_VERSION 1 +#define SERVER_PRESENT_MINOR_VERSION 0 +#endif /* !defined(NXAGENT_SERVER) */ + +/* RandR */ +#define SERVER_RANDR_MAJOR_VERSION 1 +#define SERVER_RANDR_MINOR_VERSION 5 + +/* Record */ +#define SERVER_RECORD_MAJOR_VERSION 1 +#define SERVER_RECORD_MINOR_VERSION 13 + +/* Render */ +#define SERVER_RENDER_MAJOR_VERSION 0 +#ifndef NXAGENT_SERVER +#define SERVER_RENDER_MINOR_VERSION 11 +#else /* !defined(NXAGENT_SERVER) */ +#define SERVER_RENDER_MINOR_VERSION 10 +#endif /* !defined(NXAGENT_SERVER) */ + +/* 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 +#ifndef NXAGENT_SERVER +#if XTRANS_SEND_FDS +#define SERVER_SHM_MINOR_VERSION 2 +#else +#define SERVER_SHM_MINOR_VERSION 1 +#endif +#else /* !defined(NXAGENT_SERVER) */ +#define SERVER_SHM_MINOR_VERSION 1 +#endif /* !defined(NXAGENT_SERVER) */ + +/* Sync */ +#define SERVER_SYNC_MAJOR_VERSION 3 +#ifndef NXAGENT_SERVER +#define SERVER_SYNC_MINOR_VERSION 1 +#else /* !defined(NXAGENT_SERVER) */ +#define SERVER_SYNC_MINOR_VERSION 0 +#endif /* !defined(NXAGENT_SERVER) */ + +/* Big Font */ +#define SERVER_XF86BIGFONT_MAJOR_VERSION 1 +#define SERVER_XF86BIGFONT_MINOR_VERSION 1 + +#ifndef NXAGENT_SERVER +/* Vidmode */ +#define SERVER_XF86VIDMODE_MAJOR_VERSION 2 +#define SERVER_XF86VIDMODE_MINOR_VERSION 2 +#endif /* !defined(NXAGENT_SERVER) */ + +/* Fixes */ +#ifndef NXAGENT_SERVER +#define SERVER_XFIXES_MAJOR_VERSION 5 +#define SERVER_XFIXES_MINOR_VERSION 0 +#else /* !defined(NXAGENT_SERVER) */ +#define SERVER_XFIXES_MAJOR_VERSION 3 +#define SERVER_XFIXES_MINOR_VERSION 0 +#endif /* !defined(NXAGENT_SERVER) */ + +/* X Input */ +#ifndef NXAGENT_SERVER +#define SERVER_XI_MAJOR_VERSION 2 +#define SERVER_XI_MINOR_VERSION 3 +#else /* !defined(NXAGENT_SERVER) */ +#define SERVER_XI_MAJOR_VERSION 1 +#define SERVER_XI_MINOR_VERSION 3 +#endif /* !defined(NXAGENT_SERVER) */ + +/* XKB */ +#define SERVER_XKB_MAJOR_VERSION 1 +#define SERVER_XKB_MINOR_VERSION 0 + +/* Resource */ +#define SERVER_XRES_MAJOR_VERSION 1 +#ifndef NXAGENT_SERVER +#define SERVER_XRES_MINOR_VERSION 2 +#else /* !defined(NXAGENT_SERVER) */ +#define SERVER_XRES_MINOR_VERSION 0 +#endif /* !defined(NXAGENT_SERVER) */ + +#ifndef NXAGENT_SERVER +/* XvMC */ +#define SERVER_XVMC_MAJOR_VERSION 1 +#define SERVER_XVMC_MINOR_VERSION 1 +#endif /* !defined(NXAGENT_SERVER) */ + +#endif /* PROTOCOL_VERSIONS_H */ diff --git a/nx-X11/programs/Xserver/randr/rrdispatch.c b/nx-X11/programs/Xserver/randr/rrdispatch.c index a8ca35d16..b15d1ad20 100644 --- a/nx-X11/programs/Xserver/randr/rrdispatch.c +++ b/nx-X11/programs/Xserver/randr/rrdispatch.c @@ -21,12 +21,7 @@ */ #include "randrstr.h" -#ifndef NXAGENT_SERVER #include "protocol-versions.h" -#else -#define SERVER_RANDR_MAJOR_VERSION 1 -#define SERVER_RANDR_MINOR_VERSION 5 -#endif Bool RRClientKnowsRates(ClientPtr pClient) diff --git a/nx-X11/programs/Xserver/randr/rrxinerama.c b/nx-X11/programs/Xserver/randr/rrxinerama.c index 9a164578f..5332ac01b 100644 --- a/nx-X11/programs/Xserver/randr/rrxinerama.c +++ b/nx-X11/programs/Xserver/randr/rrxinerama.c @@ -88,12 +88,7 @@ #include "randrstr.h" #include "swaprep.h" #include "panoramiXproto.h" -#ifndef NXAGENT_SERVER #include "protocol-versions.h" -#else -#define SERVER_RRXINERAMA_MAJOR_VERSION 1 -#define SERVER_RRXINERAMA_MINOR_VERSION 1 -#endif /* Xinerama is not multi-screen capable; just report about screen 0 */ #define RR_XINERAMA_SCREEN 0 diff --git a/nx-X11/programs/Xserver/record/record.c b/nx-X11/programs/Xserver/record/record.c index 2c5b867b4..590a343a0 100644 --- a/nx-X11/programs/Xserver/record/record.c +++ b/nx-X11/programs/Xserver/record/record.c @@ -60,6 +60,8 @@ and Jim Haggerty of Metheus. #include "cursor.h" #endif +#include "protocol-versions.h" + static RESTYPE RTContext; /* internal resource type for Record contexts */ static int RecordErrorBase; /* first Record error number */ @@ -2002,8 +2004,8 @@ ProcRecordQueryVersion(client) rep.type = X_Reply; rep.sequenceNumber = client->sequence; rep.length = 0; - rep.majorVersion = RECORD_MAJOR_VERSION; - rep.minorVersion = RECORD_MINOR_VERSION; + rep.majorVersion = SERVER_RECORD_MAJOR_VERSION; + rep.minorVersion = SERVER_RECORD_MINOR_VERSION; if(client->swapped) { swaps(&rep.sequenceNumber, n); diff --git a/nx-X11/programs/Xserver/render/render.c b/nx-X11/programs/Xserver/render/render.c index c73ff8305..5a4114adc 100644 --- a/nx-X11/programs/Xserver/render/render.c +++ b/nx-X11/programs/Xserver/render/render.c @@ -52,6 +52,8 @@ #include "xf86_ansic.h" #endif +#include "protocol-versions.h" + #if !defined(UINT32_MAX) #define UINT32_MAX 0xffffffffU #endif @@ -293,8 +295,8 @@ ProcRenderQueryVersion (ClientPtr client) rep.type = X_Reply; rep.length = 0; rep.sequenceNumber = client->sequence; - rep.majorVersion = RENDER_MAJOR; - rep.minorVersion = RENDER_MINOR; + rep.majorVersion = SERVER_RENDER_MAJOR_VERSION; + rep.minorVersion = SERVER_RENDER_MINOR_VERSION; if (client->swapped) { swaps(&rep.sequenceNumber, n); swapl(&rep.length, n); diff --git a/nx-X11/programs/Xserver/xfixes/xfixes.c b/nx-X11/programs/Xserver/xfixes/xfixes.c index 3b3a0f305..f97a0632d 100755 --- a/nx-X11/programs/Xserver/xfixes/xfixes.c +++ b/nx-X11/programs/Xserver/xfixes/xfixes.c @@ -27,6 +27,7 @@ #endif #include "xfixesint.h" +#include "protocol-versions.h" unsigned char XFixesReqCode; int XFixesEventBase; @@ -46,16 +47,16 @@ ProcXFixesQueryVersion(ClientPtr client) rep.type = X_Reply; rep.length = 0; rep.sequenceNumber = client->sequence; - if (stuff->majorVersion < XFIXES_MAJOR) { - rep.majorVersion = stuff->majorVersion; - rep.minorVersion = stuff->minorVersion; + if (stuff->majorVersion < SERVER_XFIXES_MAJOR_VERSION) { + rep.majorVersion = stuff->majorVersion; + rep.minorVersion = stuff->minorVersion; } else { - rep.majorVersion = XFIXES_MAJOR; - if (stuff->majorVersion == XFIXES_MAJOR && - stuff->minorVersion < XFIXES_MINOR) - rep.minorVersion = stuff->minorVersion; - else - rep.minorVersion = XFIXES_MINOR; + rep.majorVersion = SERVER_XFIXES_MAJOR_VERSION; + if (stuff->majorVersion == SERVER_XFIXES_MAJOR_VERSION && + stuff->minorVersion < SERVER_XFIXES_MINOR_VERSION) + rep.minorVersion = stuff->minorVersion; + else + rep.minorVersion = SERVER_XFIXES_MINOR_VERSION; } pXFixesClient->major_version = rep.majorVersion; pXFixesClient->minor_version = rep.minorVersion; diff --git a/nx-X11/programs/Xserver/xkb/xkb.c b/nx-X11/programs/Xserver/xkb/xkb.c index 4a1561db3..20aab8ef0 100644 --- a/nx-X11/programs/Xserver/xkb/xkb.c +++ b/nx-X11/programs/Xserver/xkb/xkb.c @@ -41,6 +41,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include <nx-X11/extensions/XKBsrv.h> #include "extnsionst.h" #include "xkb.h" +#include "protocol-versions.h" #include <nx-X11/extensions/XI.h> @@ -168,9 +169,9 @@ ProcXkbUseExtension(ClientPtr client) int supported; 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 */ - supported= ((XkbMajorVersion==1)&& + supported= ((SERVER_XKB_MAJOR_VERSION==1)&& (stuff->wantedMajor==0)&&(stuff->wantedMinor==65)); } else supported = 1; @@ -190,15 +191,15 @@ ProcXkbUseExtension(ClientPtr client) client->index, (long)client->clientAsMask, stuff->wantedMajor,stuff->wantedMinor, - XkbMajorVersion,XkbMinorVersion); + SERVER_XKB_MAJOR_VERSION,SERVER_XKB_MINOR_VERSION); } memset(&rep, 0, sizeof(xkbUseExtensionReply)); rep.type = X_Reply; rep.supported = supported; rep.length = 0; rep.sequenceNumber = client->sequence; - rep.serverMajor = XkbMajorVersion; - rep.serverMinor = XkbMinorVersion; + rep.serverMajor = SERVER_XKB_MAJOR_VERSION; + rep.serverMinor = SERVER_XKB_MINOR_VERSION; if ( client->swapped ) { swaps(&rep.sequenceNumber, n); swaps(&rep.serverMajor, n); |