diff --git a/nx-X11/programs/Xserver/hw/nxagent/Imakefile b/nx-X11/programs/Xserver/hw/nxagent/Imakefile index 8ac016aeaa..19b18e0ca0 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Imakefile +++ b/nx-X11/programs/Xserver/hw/nxagent/Imakefile @@ -239,7 +239,6 @@ DEFINES = \ -DNXAGENT_WAKEUP=1000 \ -DNXAGENT_ONSTART \ -DNXAGENT_SPLASH \ - -DNXAGENT_ARTSD \ -DNXAGENT_RANDR_MODE_PREFIX \ -UNX_DEBUG_INPUT \ -DRANDR_10_INTERFACE=1 \ diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXproperty.c b/nx-X11/programs/Xserver/hw/nxagent/NXproperty.c index ee77eb64ea..e1016cd01a 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXproperty.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXproperty.c @@ -157,18 +157,6 @@ ProcChangeProperty(ClientPtr client) } #endif -#ifdef NXAGENT_ARTSD - { - /* Do not process MCOPGLOBALS property changes, - they are already set reflecting the server side settings. - Just return success. - */ - extern Atom mcop_local_atom; - if (stuff->property == mcop_local_atom) - return client->noClientException; - } -#endif - err = ChangeWindowProperty(pWin, stuff->property, stuff->type, (int)format, (int)mode, len, (void *)&stuff[1], TRUE); if (err != Success) diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c b/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c index adff36569a..7ae1f5e940 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c @@ -283,16 +283,6 @@ InitRootWindow(WindowPtr pWin) nxagentRedirectDefaultWindows(); - #ifdef NXAGENT_ARTSD - { - char artsd_port[10]; - int nPort; - extern void nxagentPropagateArtsdProperties(ScreenPtr pScreen, char *port); - nPort = atoi(display) + 7000; - sprintf(artsd_port,"%d", nPort); - nxagentPropagateArtsdProperties(pScreen, artsd_port); - } - #endif } /***** diff --git a/nx-X11/programs/Xserver/hw/nxagent/Screen.c b/nx-X11/programs/Xserver/hw/nxagent/Screen.c index 01d8c1fc73..566626b02d 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Screen.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Screen.c @@ -153,15 +153,6 @@ ScreenPtr nxagentDefaultScreen = NULL; int nxagentArgc = 0; char **nxagentArgv = NULL; -#ifdef NXAGENT_ARTSD - -char mcop_atom[] = "MCOPGLOBALS"; -Atom mcop_local_atom = None; -unsigned char fromHexNibble(char c); -void nxagentPropagateArtsdProperties(ScreenPtr pScreen, char *port); - -#endif - Window nxagentIconWindow = None; Window nxagentFullscreenWindow = None; @@ -3356,192 +3347,6 @@ void nxagentShadowAdaptDepth(unsigned int width, unsigned int height, } } -#ifdef NXAGENT_ARTSD - -unsigned char fromHexNibble(char c) -{ - int uc = (unsigned char)c; - - if(uc >= '0' && uc <= '9') return uc - (unsigned char)'0'; - if(uc >= 'a' && uc <= 'f') return uc + 10 - (unsigned char)'a'; - if(uc >= 'A' && uc <= 'F') return uc + 10 - (unsigned char)'A'; - - return 16; /*error*/ -} - -void nxagentPropagateArtsdProperties(ScreenPtr pScreen, char *port) -{ - Window rootWin; - XlibAtom atomReturnType; - XlibAtom propAtom; - int iReturnFormat; - unsigned long ulReturnItems; - unsigned long ulReturnBytesLeft; - unsigned char *pszReturnData = NULL; - int iReturn; - - int i,in; - char tchar[] = " "; -/* -FIXME: The port information is not used at the moment and produces a - warning on recent gcc versions. Do we need such information - to run the audio forawrding? - - char *chport; - char hex[] = "0123456789abcdef"; -*/ - rootWin = DefaultRootWindow(nxagentDisplay); - propAtom = nxagentAtoms[4]; /* MCOPGLOBALS */ - - /* - * Get at most 64KB of data. - */ - - iReturn = XGetWindowProperty(nxagentDisplay, - rootWin, - propAtom, - 0, - 65536 / 4, - False, - XA_STRING, - &atomReturnType, - &iReturnFormat, - &ulReturnItems, - &ulReturnBytesLeft, - &pszReturnData); - - if (iReturn == Success && atomReturnType != None && - ulReturnItems > 0 && pszReturnData != NULL) - { - char *local_buf; - - #ifdef TEST - fprintf(stderr, "nxagentPropagateArtsdProperties: Got [%ld] elements of format [%d] with [%ld] bytes left.\n", - ulReturnItems, iReturnFormat, ulReturnBytesLeft); - #endif - - #ifdef WARNING - - if (ulReturnBytesLeft > 0) - { - fprintf(stderr, "nxagentPropagateArtsdProperties: WARNING! Could not get the whole ARTSD property data.\n"); - } - - #endif - - local_buf = (char *) malloc(strlen((char*)pszReturnData) + 100); - - if (local_buf) - { - memset(local_buf, 0, strlen((char *) pszReturnData)); - - for (i = 0, in = 0; pszReturnData[i] != '\0'; i++) - { - local_buf[in]=pszReturnData[i]; - - if(pszReturnData[i]==':') - { - i++; - - while(pszReturnData[i]!='\n') - { - unsigned char h; - unsigned char l; - - h = fromHexNibble(pszReturnData[i]); - i++; - if(pszReturnData[i]=='\0') continue; - l = fromHexNibble(pszReturnData[i]); - i++; - - if(h >= 16 || l >= 16) continue; - - /* - * FIXME: The array tchar[] was used uninitialized. - * It's not clear to me the original purpose of the - * piece of code using it. To be removed in future - * versions. - */ - - tchar[0]=tchar[1]; - tchar[1]=tchar[2]; - tchar[2]=tchar[3]; - tchar[3] = (h << 4) + l; - tchar[4]='\0'; - - if (strncmp(tchar, "tcp:", 4) == 0) - { - local_buf[in-7]='1'; - local_buf[in-6]=strlen(port)+47; - - in++; - local_buf[in]=pszReturnData[i-2]; - in++; - local_buf[in]=pszReturnData[i-1]; - - strcat(local_buf,"6c6f63616c686f73743a"); - in+=20; - -/* -FIXME: The port information is not used at the moment and produces a - warning on recent gcc versions. Do we need such information - to run the audio forawrding? - - chport=&port[0]; - - while(*chport!='\0') - { - in++; - local_buf[in]=hex[(*chport >> 4) & 0xf]; - in++; - local_buf[in]=hex[*chport & 0xf]; - *chport++; - } -*/ - strcat(local_buf,"00"); - in+=2; - - while(pszReturnData[i]!='\n') - { - i++; - } - } - else - { - in++; - local_buf[in]=pszReturnData[i-2]; - in++; - local_buf[in]=pszReturnData[i-1]; - } - } - - in++; - local_buf[in]=pszReturnData[i]; - } - - in++; - } - - local_buf[in]=0; - - if (strlen(local_buf)) - { - mcop_local_atom = MakeAtom(mcop_atom, strlen(mcop_atom), 1); - - ChangeWindowProperty(pScreen->root, - mcop_local_atom, - XA_STRING, - iReturnFormat, PropModeReplace, - strlen(local_buf), local_buf, 1); - } - - free(local_buf); - } - } -} - -#endif - Bool nxagentReconnectScreen(void *p0) { CARD16 w, h;