[X2Go-Commits] [nx-libs] 18/30: Xserver/xkb: Remove -xkbmap argument.

git-admin at x2go.org git-admin at x2go.org
Tue Jul 3 22:24:05 CEST 2018


This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch 3.6.x
in repository nx-libs.

commit ec0cfcecf31dbb504e8a09e59dd877f883a1c030
Author: Daniel Stone <daniel at fooishbar.org>
Date:   Thu Feb 16 20:53:04 2017 +0000

    Xserver/xkb: Remove -xkbmap argument.
    
     Backported from X.org:
    
     commit fd8bde8bb0f9d796b3464973b53285c0a6d22a31
     Author: Daniel Stone <daniel at fooishbar.org>
     Date:   Mon May 29 11:14:03 2006 +0000
    
        Remove -xkbmap argument.
    
     Backported-to-NX-by: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
---
 nx-X11/programs/Xserver/hw/nxagent/Keyboard.c | 11 -------
 nx-X11/programs/Xserver/xkb/xkbInit.c         | 45 ---------------------------
 nx-X11/programs/Xserver/xkb/xkbUtils.c        | 20 ------------
 3 files changed, 76 deletions(-)

diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c
index 5454081..6a14667 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c
@@ -966,17 +966,6 @@ XkbError:
         options = XKB_DFLT_KB_OPTIONS;
 
         #ifdef TEST
-        fprintf(stderr, "nxagentKeyboardProc: XkbInitialMap (option -xkbmap) is [%s]\n", XkbInitialMap ? XkbInitialMap : "NULL");
-        #endif
-
-        if (XkbInitialMap) {
-          if ((names.keymap = strchr(XkbInitialMap, '/')) != NULL)
-            ++names.keymap;
-          else
-            names.keymap = XkbInitialMap;
-        }
-
-        #ifdef TEST
         fprintf(stderr, "nxagentKeyboardProc: Init XKB extension.\n");
         #endif
 
diff --git a/nx-X11/programs/Xserver/xkb/xkbInit.c b/nx-X11/programs/Xserver/xkb/xkbInit.c
index a6417af..53d8f4d 100644
--- a/nx-X11/programs/Xserver/xkb/xkbInit.c
+++ b/nx-X11/programs/Xserver/xkb/xkbInit.c
@@ -115,7 +115,6 @@ typedef struct	_SrvXkmInfo {
 
 char	*		XkbBaseDirectory=	XKB_BASE_DIRECTORY;
 char	*		XkbBinDirectory=	XKB_BIN_DIRECTORY;
-char	*		XkbInitialMap=		NULL;
 int	 		XkbWantAccessX=		0;	
 static XkbFileInfo *	_XkbInitFileInfo=	NULL;
 
@@ -503,35 +502,6 @@ XkbEventCauseRec	cause;
     file.file=NULL;
     bzero(&file.xkbinfo,sizeof(XkbFileInfo));
     bzero(&changes,sizeof(XkbChangesRec));
-    if (XkbInitialMap!=NULL) {
-	if ((file.file=XkbDDXOpenConfigFile(XkbInitialMap,NULL,0))!=NULL) {
-	    XkmReadFile(file.file,0,XkmKeymapLegal,&file.xkbinfo);
-	    if (file.xkbinfo.xkb==NULL) {
-		LogMessage(X_ERROR,
-				"Error loading keymap file %s (%s in %s)\n"
-				"\treverting to defaults\n",
-				XkbInitialMap, _XkbErrMessages[_XkbErrCode],
-				(_XkbErrLocation?_XkbErrLocation:"unknown"));
-		fclose(file.file);
-		file.file= NULL;
-		bzero(&file.xkbinfo,sizeof(XkbFileInfo));
-	    }
-	    else {
-		if (_XkbInitFileInfo!=NULL) {
-		    XkbDescPtr	tmp;
-		    if ((tmp=_XkbInitFileInfo->xkb)!=NULL) {
-			XkbFreeKeyboard(tmp,XkbAllComponentsMask,True);
-			_XkbInitFileInfo->xkb= NULL;
-		    }
-		}
-		_XkbInitFileInfo= &file.xkbinfo;
-	    }
-	}
-	else {
-	    LogMessage(X_ERROR, "Error opening keymap file %s, reverting to defaults\n",
-	    	    XkbInitialMap);
-	}
-    }
     pXDev->key->xkbInfo= xkbi= _XkbTypedCalloc(1,XkbSrvInfoRec);
     if ( xkbi ) {
 	XkbDescPtr	xkb;
@@ -914,20 +884,6 @@ XkbProcessArguments(int argc,char *argv[],int i)
 	    return -1;
 	}
     }
-    else if (strncmp(argv[i], "-xkbmap", 7) == 0) {
-	if(++i < argc) {
-	    if (strlen(argv[i]) < PATH_MAX) {
-		XkbInitialMap= argv[i];
-		return 2;
-	    } else {
-		LogMessage(X_ERROR, "-xkbmap pathname too long\n");
-		return -1;
-	    }
-	}
-	else {
-	    return -1;
-	}
-    }
     else if ((strncmp(argv[i],"-accessx",8)==0)||
                  (strncmp(argv[i],"+accessx",8)==0)) {
 	int j=1;	    
@@ -990,5 +946,4 @@ XkbUseMsg(void)
     ErrorF("                       enable/disable accessx key sequences\n");
     ErrorF("-ardelay               set XKB autorepeat delay\n");
     ErrorF("-arinterval            set XKB autorepeat interval\n");
-    ErrorF("-xkbmap                XKB keyboard description to load on startup\n");
 }
diff --git a/nx-X11/programs/Xserver/xkb/xkbUtils.c b/nx-X11/programs/Xserver/xkb/xkbUtils.c
index 4adcc87..fa252b1 100644
--- a/nx-X11/programs/Xserver/xkb/xkbUtils.c
+++ b/nx-X11/programs/Xserver/xkb/xkbUtils.c
@@ -859,26 +859,6 @@ XkbDescPtr	xkb=	xkbi->desc;
     }
     if ((xkb->geom!=NULL)&&(xkb->geom->name==name))
 	return xkb->geom;
-    else if ((name==xkb->names->geometry)&&(xkb->geom==NULL)) {
-	FILE *file= XkbDDXOpenConfigFile(XkbInitialMap,NULL,0);
-	if (file!=NULL) {
-	    XkbFileInfo		xkbFInfo;
-	    xkmFileInfo		finfo;
-	    xkmSectionInfo	toc[MAX_TOC],*entry;
-	    bzero(&xkbFInfo,sizeof(xkbFInfo));
-	    xkbFInfo.xkb= xkb;
-	    if (XkmReadTOC(file,&finfo,MAX_TOC,toc)) {
-		entry= XkmFindTOCEntry(&finfo,toc,XkmGeometryIndex);
-		if (entry!=NULL)
-		    XkmReadFileSection(file,entry,&xkbFInfo,NULL);
-	    }
-	    fclose(file);
-	    if (xkb->geom) {
-		*shouldFree= 0;
-		return xkb->geom;
-	    }
-	}
-    }
     *shouldFree= 1;
     return NULL;
 }

--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git


More information about the x2go-commits mailing list