From b9f5ab98c8dea36dcce1ad15fd2e059a77e77c39 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Mon, 15 Oct 2007 16:18:37 -0400 Subject: [PATCH] registry: Register XINERAMA extension protocol names. --- Xext/panoramiX.c | 14 ++++++++++++++ hw/darwin/quartz/pseudoramiX.c | 14 ++++++++++++++ randr/rrxinerama.c | 26 +++++++++++++++++++++----- 3 files changed, 49 insertions(+), 5 deletions(-) diff --git a/Xext/panoramiX.c b/Xext/panoramiX.c index 26c280990..1ba0c4dd2 100644 --- a/Xext/panoramiX.c +++ b/Xext/panoramiX.c @@ -53,6 +53,7 @@ Equipment Corporation. #include "globals.h" #include "servermd.h" #include "resource.h" +#include "registry.h" #ifdef RENDER #include "picturestr.h" #endif @@ -589,6 +590,19 @@ void PanoramiXExtensionInit(int argc, char *argv[]) #ifdef RENDER PanoramiXRenderInit (); #endif + + RegisterRequestName(extEntry->base, X_PanoramiXQueryVersion, + PANORAMIX_PROTOCOL_NAME ":QueryVersion"); + RegisterRequestName(extEntry->base, X_PanoramiXGetState, + PANORAMIX_PROTOCOL_NAME ":GetState"); + RegisterRequestName(extEntry->base, X_PanoramiXGetScreenCount, + PANORAMIX_PROTOCOL_NAME ":GetScreenCount"); + RegisterRequestName(extEntry->base, X_PanoramiXGetScreenSize, + PANORAMIX_PROTOCOL_NAME ":GetScreenSize"); + RegisterRequestName(extEntry->base, X_XineramaIsActive, + PANORAMIX_PROTOCOL_NAME ":IsActive"); + RegisterRequestName(extEntry->base, X_XineramaQueryScreens, + PANORAMIX_PROTOCOL_NAME ":QueryScreens"); } extern Bool CreateConnectionBlock(void); diff --git a/hw/darwin/quartz/pseudoramiX.c b/hw/darwin/quartz/pseudoramiX.c index 787601b5d..cdd4fffff 100644 --- a/hw/darwin/quartz/pseudoramiX.c +++ b/hw/darwin/quartz/pseudoramiX.c @@ -42,6 +42,7 @@ Equipment Corporation. #include "window.h" #include #include "globals.h" +#include "registry.h" extern int noPseudoramiXExtension; extern int noPanoramiXExtension; @@ -147,6 +148,19 @@ void PseudoramiXExtensionInit(int argc, char *argv[]) PANORAMIX_PROTOCOL_NAME); return; } + + RegisterRequestName(extEntry->base, X_PanoramiXQueryVersion, + PANORAMIX_PROTOCOL_NAME ":QueryVersion"); + RegisterRequestName(extEntry->base, X_PanoramiXGetState, + PANORAMIX_PROTOCOL_NAME ":GetState"); + RegisterRequestName(extEntry->base, X_PanoramiXGetScreenCount, + PANORAMIX_PROTOCOL_NAME ":GetScreenCount"); + RegisterRequestName(extEntry->base, X_PanoramiXGetScreenSize, + PANORAMIX_PROTOCOL_NAME ":GetScreenSize"); + RegisterRequestName(extEntry->base, X_XineramaIsActive, + PANORAMIX_PROTOCOL_NAME ":IsActive"); + RegisterRequestName(extEntry->base, X_XineramaQueryScreens, + PANORAMIX_PROTOCOL_NAME ":QueryScreens"); } diff --git a/randr/rrxinerama.c b/randr/rrxinerama.c index 896f61fb5..c49980256 100644 --- a/randr/rrxinerama.c +++ b/randr/rrxinerama.c @@ -71,6 +71,7 @@ #include "randrstr.h" #include "swaprep.h" #include +#include "registry.h" #define RR_XINERAMA_MAJOR_VERSION 1 #define RR_XINERAMA_MINOR_VERSION 1 @@ -423,6 +424,8 @@ RRXineramaResetProc(ExtensionEntry* extEntry) void RRXineramaExtensionInit(void) { + ExtensionEntry *extEntry; + #ifdef PANORAMIX if(!noPanoramiXExtension) return; @@ -436,9 +439,22 @@ RRXineramaExtensionInit(void) if (screenInfo.numScreens > 1) return; - (void) AddExtension(PANORAMIX_PROTOCOL_NAME, 0,0, - ProcRRXineramaDispatch, - SProcRRXineramaDispatch, - RRXineramaResetProc, - StandardMinorOpcode); + extEntry = AddExtension(PANORAMIX_PROTOCOL_NAME, 0, 0, + ProcRRXineramaDispatch, + SProcRRXineramaDispatch, + RRXineramaResetProc, + StandardMinorOpcode); + + RegisterRequestName(extEntry->base, X_PanoramiXQueryVersion, + PANORAMIX_PROTOCOL_NAME ":QueryVersion"); + RegisterRequestName(extEntry->base, X_PanoramiXGetState, + PANORAMIX_PROTOCOL_NAME ":GetState"); + RegisterRequestName(extEntry->base, X_PanoramiXGetScreenCount, + PANORAMIX_PROTOCOL_NAME ":GetScreenCount"); + RegisterRequestName(extEntry->base, X_PanoramiXGetScreenSize, + PANORAMIX_PROTOCOL_NAME ":GetScreenSize"); + RegisterRequestName(extEntry->base, X_XineramaIsActive, + PANORAMIX_PROTOCOL_NAME ":IsActive"); + RegisterRequestName(extEntry->base, X_XineramaQueryScreens, + PANORAMIX_PROTOCOL_NAME ":QueryScreens"); }