xserver: Branch 'mpx'

Peter Hutterer whot at kemper.freedesktop.org
Tue May 6 21:49:25 PDT 2008


 config/hal.c         |   27 +++++----------------------
 config/x11-input.fdi |   16 +++++++++-------
 2 files changed, 14 insertions(+), 29 deletions(-)

New commits:
commit 26188875de1ccc84ac60bfb251e3ec43de2b9e22
Author: Peter Hutterer <peter at cs.unisa.edu.au>
Date:   Wed May 7 13:13:57 2008 +0930

    config: deprecate (and ignore) the use of input.xkb.whatever options.
    
    These options are still sent by some HAL implementations (e.g. HAL on FC8),
    and may overwrite the options set in the x11-input.fdi file.
    For a more detailed description of why see Bug #13037, comment 42.
    
    X.Org Bug 13037 <http://bugs.freedesktop.org/show_bug.cgi?id=13037#c42>

diff --git a/config/hal.c b/config/hal.c
index f150646..05a02cc 100644
--- a/config/hal.c
+++ b/config/hal.c
@@ -167,7 +167,7 @@ device_added(LibHalContext *hal_ctx, const char *udi)
 	
     LibHalPropertySet *set = NULL;
 	LibHalPropertySetIterator set_iter;
-    char *psi_key = NULL, *tmp_val, *tmp_key;
+    char *psi_key = NULL, *tmp_val;
     
     
     dbus_error_init(&error);
@@ -244,27 +244,10 @@ device_added(LibHalContext *hal_ctx, const char *udi)
                     add_option(&options, psi_key + sizeof(LIBHAL_PROP_KEY)-1, tmp_val);
                     xfree(tmp_val);
                 }
-            
-            /* evdev's XKB options... we should probably depreciate this usage */
-            } else if (!strncasecmp(psi_key, LIBHAL_XKB_PROP_KEY, sizeof(LIBHAL_XKB_PROP_KEY)-1)){
-                
-                /* only support strings for all values */
-                tmp_val = get_prop_string(hal_ctx, udi, psi_key);
-                
-                if (tmp_val){
-                    /* add "xkb_" + NULL */
-		    tmp_key = xalloc(strlen(psi_key) - ( sizeof(LIBHAL_XKB_PROP_KEY) - 1) + 5);
-                    
-                    if (!tmp_key){
-                        LogMessage(X_ERROR, "config/hal: couldn't allocate memory for option %s\n", psi_key);
-                    } else {
-                        sprintf(tmp_key, "xkb_%s", psi_key + sizeof(LIBHAL_XKB_PROP_KEY)-1);
-                        add_option(&options, tmp_key, tmp_val);
-                        
-                        xfree(tmp_key);
-                    }
-                    xfree(tmp_val);
-                }   
+            }           /* don't accept input.xkb.whatever options anymore */
+            else if (!strncasecmp(psi_key, LIBHAL_XKB_PROP_KEY, sizeof(LIBHAL_XKB_PROP_KEY)-1)){
+                LogMessage(X_ERROR, "config/hal: Option '%s' is "
+                        "deprecated (ignoring).\n", psi_key);
             }
         }
         
diff --git a/config/x11-input.fdi b/config/x11-input.fdi
index f2e2d50..85d7a1f 100644
--- a/config/x11-input.fdi
+++ b/config/x11-input.fdi
@@ -26,19 +26,21 @@
 	    Do not specify "input.x11_options.Device" since "input.device"
 	    will be used automatically.
 
-        Legacy Keys
+
+        XKB configuration:
+	     "input.x11_options.XkbRules"
+	     "input.x11_options.XkbModel"
+	     "input.x11_options.XkbLayout"
+	     "input.x11_options.XkbVariant"
+	     "input.x11_options.XkbOptions"
+
+        Legacy Keys (deprecated and ignored by the server):
 	     "input.xkb.rules"
              "input.xkb.model"
              "input.xkb.layout"
              "input.xkb.variant"
              "input.xkb.options"
              
-            These keys are deprecated. Use these instead:
-	     "input.x11_options.XkbRules"
-	     "input.x11_options.XkbModel"
-	     "input.x11_options.XkbLayout"
-	     "input.x11_options.XkbVariant"
-	     "input.x11_options.XkbOptions"
 
 	    See the evdev documentation for more information. 
     


More information about the xorg-commit mailing list