[Xorg-commit] xc/programs/Xserver/hw/xwin winconfig.c,1.1.4.1.2.7,1.1.4.1.2.8 winconfig.h,1.1.6.1,1.1.6.2 winprocarg.c,1.1.2.3,1.1.2.4

Alexander Gottwald xorg-commit at pdx.freedesktop.org
Wed May 9 17:30:30 EEST 2007


Committed by: ago

Update of /cvs/xorg/xc/programs/Xserver/hw/xwin
In directory pdx:/tmp/cvs-serv12916

Modified Files:
      Tag: CYGWIN
	winconfig.c winconfig.h winprocarg.c 
Log Message:
add xkb some settings (rules, model, layout, variant, options) to the commandline options and parse them even with configfile support is turned off

Index: winconfig.c
===================================================================
RCS file: /cvs/xorg/xc/programs/Xserver/hw/xwin/winconfig.c,v
retrieving revision 1.1.4.1.2.7
retrieving revision 1.1.4.1.2.8
diff -u -d -r1.1.4.1.2.7 -r1.1.4.1.2.8
--- winconfig.c	15 Feb 2004 19:39:03 -0000	1.1.4.1.2.7
+++ winconfig.c	16 Feb 2004 01:22:13 -0000	1.1.4.1.2.8
@@ -64,6 +64,11 @@
 #ifdef XKB
   FALSE,			/* noXkbExtension */
   NULL,				/* xkbMap */
+  NULL,             /* xkbRules */
+  NULL,             /* xkbModel */
+  NULL,             /* xkbLayout */
+  NULL,             /* xkbVariant */
+  NULL,             /* xkbOptions */
 #endif
   NULL,				/* screenname */
   NULL,				/* mousename */
@@ -429,34 +434,84 @@
 	}
       else
 	{
-	  if ((s = winSetStrOption (kbd->inp_option_lst, "XkbRules", NULL)))
+          if (g_cmdline.xkbRules)
+            {
+              s = g_cmdline.xkbRules;
+              from = X_CMDLINE;  
+            }
+          else 
+            {   
+              s = winSetStrOption (kbd->inp_option_lst, "XkbRules", NULL);
+              from = X_CONFIG;  
+            }
+          if (s)
 	    {
 	      g_winInfo.xkb.rules = NULL_IF_EMPTY (s);
-	      winMsg (X_CONFIG, "XKB: rules: \"%s\"\n", s);
+	      winMsg (from, "XKB: rules: \"%s\"\n", s);
 	    }
 
-	  if ((s = winSetStrOption (kbd->inp_option_lst, "XkbModel", NULL)))
+          if (g_cmdline.xkbModel)
+            {
+              s = g_cmdline.xkbModel;
+              from = X_CMDLINE;
+            }
+          else
+            {
+              s = winSetStrOption (kbd->inp_option_lst, "XkbModel", NULL);
+              from = X_CONFIG;
+            }  
+	  if (s)
 	    {
 	      g_winInfo.xkb.model = NULL_IF_EMPTY (s);
-	      winMsg (X_CONFIG, "XKB: model: \"%s\"\n", s);
+	      winMsg (from, "XKB: model: \"%s\"\n", s);
 	    }
 
-	  if ((s = winSetStrOption (kbd->inp_option_lst, "XkbLayout", NULL)))
+          if (g_cmdline.xkbLayout)
+            {
+              s = g_cmdline.xkbLayout;
+              from = X_CMDLINE;
+            } 
+          else
+            {
+              s = winSetStrOption (kbd->inp_option_lst, "XkbLayout", NULL);
+              from = X_CONFIG;
+            }
+          if (s)  
 	    {
 	      g_winInfo.xkb.layout = NULL_IF_EMPTY (s);
-	      winMsg (X_CONFIG, "XKB: layout: \"%s\"\n", s);
+	      winMsg (from, "XKB: layout: \"%s\"\n", s);
 	    }
 
-	  if ((s = winSetStrOption (kbd->inp_option_lst, "XkbVariant", NULL)))
+          if (g_cmdline.xkbVariant)
+            {
+              s = g_cmdline.xkbVariant;
+              from = X_CMDLINE;
+            }
+          else
+            { 
+              s = winSetStrOption (kbd->inp_option_lst, "XkbVariant", NULL);
+              from = X_CONFIG;
+            }
+	  if (s)
 	    {
 	      g_winInfo.xkb.variant = NULL_IF_EMPTY (s);
-	      winMsg (X_CONFIG, "XKB: variant: \"%s\"\n", s);
+	      winMsg (from, "XKB: variant: \"%s\"\n", s);
 	    }
 
-	  if ((s = winSetStrOption (kbd->inp_option_lst, "XkbOptions", NULL)))
+          if (g_cmdline.xkbOptions)
+            {
+              s=g_cmdline.xkbOptions;
+              from = X_CMDLINE;
+            } 
+          else
+            { 
+              s = winSetStrOption (kbd->inp_option_lst, "XkbOptions", NULL);
+              from = X_CONFIG;
+            }
+          if (s)
 	    {
 	      g_winInfo.xkb.options = NULL_IF_EMPTY (s);
-	      winMsg (X_CONFIG, "XKB: options: \"%s\"\n", s);
+	      winMsg (from, "XKB: options: \"%s\"\n", s);
 	    }
 
 	  from = X_CMDLINE;
@@ -526,6 +581,32 @@
         }
 #endif
     }
+#else
+  if (g_cmdline.xkbRules) 
+    {
+      g_winInfo.xkb.rules = g_cmdline.xkbRules;
+      winMsg (X_CMDLINE, "XKB: rules: \"%s\"\n", g_cmdline.xkbRules);
+    }
+  if (g_cmdline.xkbModel) 
+    {
+      g_winInfo.xkb.model = g_cmdline.xkbModel;
+      winMsg (X_CMDLINE, "XKB: model: \"%s\"\n", g_cmdline.xkbModel);
+    }
+  if (g_cmdline.xkbLayout) 
+    {
+      g_winInfo.xkb.layout = g_cmdline.xkbLayout;
+      winMsg (X_CMDLINE, "XKB: layout: \"%s\"\n", g_cmdline.xkbLayout);
+    }
+  if (g_cmdline.xkbVariant) 
+    {
+      g_winInfo.xkb.variant = g_cmdline.xkbVariant;
+      winMsg (X_CMDLINE, "XKB: variant: \"%s\"\n", g_cmdline.xkbVariant);
+    }
+  if (g_cmdline.xkbOptions) 
+    {
+      g_winInfo.xkb.options = g_cmdline.xkbOptions;
+      winMsg (X_CMDLINE, "XKB: options: \"%s\"\n", g_cmdline.xkbOptions);
+    }
 #endif
 
   return TRUE;

Index: winconfig.h
===================================================================
RCS file: /cvs/xorg/xc/programs/Xserver/hw/xwin/winconfig.h,v
retrieving revision 1.1.6.1
retrieving revision 1.1.6.2
diff -u -d -r1.1.6.1 -r1.1.6.2
--- winconfig.h	15 Jan 2004 06:06:44 -0000	1.1.6.1
+++ winconfig.h	16 Feb 2004 01:22:13 -0000	1.1.6.2
@@ -195,6 +195,12 @@
 #ifdef XKB
   Bool noXkbExtension;
   char *xkbMap;
+  char *xkbRules; 
+  char *xkbModel;
+  char *xkbLayout;
+  char *xkbVariant;
+  char *xkbOptions;
+
 #endif
   /* layout */
   char *screenname;

Index: winprocarg.c
===================================================================
RCS file: /cvs/xorg/xc/programs/Xserver/hw/xwin/Attic/winprocarg.c,v
retrieving revision 1.1.2.3
retrieving revision 1.1.2.4
diff -u -d -r1.1.2.3 -r1.1.2.4
--- winprocarg.c	10 Jan 2004 07:50:57 -0000	1.1.2.3
+++ winprocarg.c	16 Feb 2004 01:22:13 -0000	1.1.2.4
@@ -1040,6 +1040,37 @@
       g_cmdline.noXkbExtension = TRUE;  
       return 0; /* Let DIX parse this again */
     }
+
+  if (IS_OPTION ("-xkbrules"))
+    {
+      CHECK_ARGS (1);
+      g_cmdline.xkbRules = argv[++i];
+      return 2;
+    }
+  if (IS_OPTION ("-xkbmodel"))
+    {
+      CHECK_ARGS (1);
+      g_cmdline.xkbModel = argv[++i];
+      return 2;
+    }
+  if (IS_OPTION ("-xkblayout"))
+    {
+      CHECK_ARGS (1);
+      g_cmdline.xkbLayout = argv[++i];
+      return 2;
+    }
+  if (IS_OPTION ("-xkbvariant"))
+    {
+      CHECK_ARGS (1);
+      g_cmdline.xkbVariant = argv[++i];
+      return 2;
+    }
+  if (IS_OPTION ("-xkboptions"))
+    {
+      CHECK_ARGS (1);
+      g_cmdline.xkbOptions = argv[++i];
+      return 2;
+    }
 #endif
 
   return 0;





More information about the xorg-commit mailing list