xserver: Branch 'master' - 3 commits

Daniel Stone daniels at kemper.freedesktop.org
Tue Aug 7 15:34:44 PDT 2007


 config/hal.c         |   35 +++++++++++++++++------------------
 config/x11-input.fdi |   10 +++++-----
 configure.ac         |   16 ++++++++--------
 3 files changed, 30 insertions(+), 31 deletions(-)

New commits:
diff-tree 30259d5a4e95ff20b30807e5e207ab5995a3fdaf (from aef255425a3521d66c3405d34f7787628a22703e)
Author: Daniel Stone <daniel at fooishbar.org>
Date:   Tue Aug 7 20:58:49 2007 +0300

    Hotplug: HAL: Fix error handling
    
    Don't use our DBusError for property getting, because we simply don't care:
    this fixes D-Bus error spew to stderr.  Thanks Michel Dänzer for debugging
    and testing.

diff --git a/config/hal.c b/config/hal.c
index 833ec59..d7835e6 100644
--- a/config/hal.c
+++ b/config/hal.c
@@ -98,12 +98,11 @@ add_option(InputOption **options, const 
 }
 
 static char *
-get_prop_string(LibHalContext *hal_ctx, const char *udi, const char *name,
-                DBusError *error)
+get_prop_string(LibHalContext *hal_ctx, const char *udi, const char *name)
 {
     char *prop, *ret;
 
-    prop = libhal_device_get_property_string(hal_ctx, udi, name, error);
+    prop = libhal_device_get_property_string(hal_ctx, udi, name, NULL);
     DebugF(" [config/hal] getting %s on %s returned %s\n", name, udi, prop);
     if (prop) {
         ret = xstrdup(prop);
@@ -117,13 +116,12 @@ get_prop_string(LibHalContext *hal_ctx, 
 }
 
 static char *
-get_prop_string_array(LibHalContext *hal_ctx, const char *udi, const char *prop,
-                      DBusError *error)
+get_prop_string_array(LibHalContext *hal_ctx, const char *udi, const char *prop)
 {
     char **props, *ret, *str;
     int i, len = 0;
 
-    props = libhal_device_get_property_strlist(hal_ctx, udi, prop, error);
+    props = libhal_device_get_property_strlist(hal_ctx, udi, prop, NULL);
     if (props) {
         for (i = 0; props[i]; i++)
             len += strlen(props[i]);
@@ -187,24 +185,22 @@ device_added(LibHalContext *hal_ctx, con
     if (type == TYPE_NONE)
         goto out_error;
 
-    driver = get_prop_string(hal_ctx, udi, "input.x11_driver", &error);
-    path = get_prop_string(hal_ctx, udi, "input.device", &error);
+    driver = get_prop_string(hal_ctx, udi, "input.x11_driver");
+    path = get_prop_string(hal_ctx, udi, "input.device");
     if (!driver || !path) {
         DebugF("[config/hal] no driver or path specified for %s\n", udi);
         goto unwind;
     }
-    name = get_prop_string(hal_ctx, udi, "info.product", &error);
+    name = get_prop_string(hal_ctx, udi, "info.product");
     if (!name)
         name = xstrdup("(unnamed)");
 
     if (type & TYPE_KEYS) {
-        xkb_rules = get_prop_string(hal_ctx, udi, "input.xkb.rules", &error);
-        xkb_model = get_prop_string(hal_ctx, udi, "input.xkb.model", &error);
-        xkb_layout = get_prop_string(hal_ctx, udi, "input.xkb.layout", &error);
-        xkb_variant = get_prop_string(hal_ctx, udi, "input.xkb.variant",
-                                      &error);
-        xkb_options = get_prop_string_array(hal_ctx, udi, "input.xkb.options",
-                                            &error);
+        xkb_rules = get_prop_string(hal_ctx, udi, "input.xkb.rules");
+        xkb_model = get_prop_string(hal_ctx, udi, "input.xkb.model");
+        xkb_layout = get_prop_string(hal_ctx, udi, "input.xkb.layout");
+        xkb_variant = get_prop_string(hal_ctx, udi, "input.xkb.variant");
+        xkb_options = get_prop_string_array(hal_ctx, udi, "input.xkb.options");
     }
 
     options = xcalloc(sizeof(*options), 1);
@@ -273,7 +269,8 @@ disconnect_hook(void *data)
     if (info->hal_ctx) {
         dbus_error_init(&error);
         if (!libhal_ctx_shutdown(info->hal_ctx, &error))
-            DebugF("[config/hal] couldn't shut down context?\n");
+            DebugF("[config/hal] couldn't shut down context: %s (%s)\n",
+                   error.name, error.message);
         libhal_ctx_free(info->hal_ctx);
         dbus_error_free(&error);
     }
@@ -320,6 +317,7 @@ connect_hook(DBusConnection *connection,
 
     devices = libhal_find_device_by_capability(info->hal_ctx, "input",
                                                &num_devices, &error);
+    /* FIXME: Get default devices if error is set. */
     for (i = 0; i < num_devices; i++)
         device_added(info->hal_ctx, devices[i]);
     libhal_free_string_array(devices);
@@ -330,7 +328,8 @@ connect_hook(DBusConnection *connection,
 
 out_ctx2:
     if (!libhal_ctx_shutdown(info->hal_ctx, &error))
-        DebugF("[config/hal] couldn't shut down context?\n");
+        DebugF("[config/hal] couldn't shut down context: %s (%s)\n",
+               error.name, error.message);
 out_ctx:
     libhal_ctx_free(info->hal_ctx);
 out_err:
diff-tree aef255425a3521d66c3405d34f7787628a22703e (from 838e59c02ec06446fc180fb9d86fa8793c7b9903)
Author: Daniel Stone <daniel at fooishbar.org>
Date:   Tue Aug 7 16:37:42 2007 +0300

    Config: HAL: Use input.xkb namespace
    
    Use an explicit input.xkb.foo namespace, not input.xkb_foo.

diff --git a/config/hal.c b/config/hal.c
index f29ba92..833ec59 100644
--- a/config/hal.c
+++ b/config/hal.c
@@ -198,12 +198,12 @@ device_added(LibHalContext *hal_ctx, con
         name = xstrdup("(unnamed)");
 
     if (type & TYPE_KEYS) {
-        xkb_rules = get_prop_string(hal_ctx, udi, "input.xkb_rules", &error);
-        xkb_model = get_prop_string(hal_ctx, udi, "input.xkb_model", &error);
-        xkb_layout = get_prop_string(hal_ctx, udi, "input.xkb_layout", &error);
-        xkb_variant = get_prop_string(hal_ctx, udi, "input.xkb_variant",
+        xkb_rules = get_prop_string(hal_ctx, udi, "input.xkb.rules", &error);
+        xkb_model = get_prop_string(hal_ctx, udi, "input.xkb.model", &error);
+        xkb_layout = get_prop_string(hal_ctx, udi, "input.xkb.layout", &error);
+        xkb_variant = get_prop_string(hal_ctx, udi, "input.xkb.variant",
                                       &error);
-        xkb_options = get_prop_string_array(hal_ctx, udi, "input.xkb_options",
+        xkb_options = get_prop_string_array(hal_ctx, udi, "input.xkb.options",
                                             &error);
     }
 
diff --git a/config/x11-input.fdi b/config/x11-input.fdi
index c0e636f..7f516ca 100644
--- a/config/x11-input.fdi
+++ b/config/x11-input.fdi
@@ -11,21 +11,21 @@
     </match>
 
     <match key="info.capabilities" contains="input.keys">
-      <merge key="input.xkb_rules" type="string">base</merge>
+      <merge key="input.xkb.rules" type="string">base</merge>
 
       <!-- If we're using Linux, we use evdev by default (falling back to
            keyboard otherwise). -->
       <merge key="input.x11_driver" type="string">keyboard</merge>
-      <merge key="input.xkb_model" type="string">keyboard</merge>
+      <merge key="input.xkb.model" type="string">keyboard</merge>
       <match key="/org/freedesktop/Hal/devices/computer:system.kernel.name"
              string="Linux">
         <merge key="input.x11_driver" type="string">evdev</merge>
-        <merge key="input.xkb_model" type="string">evdev</merge>
+        <merge key="input.xkb.model" type="string">evdev</merge>
       </match>
 
-      <merge key="input.xkb_layout" type="string">us</merge>
+      <merge key="input.xkb.layout" type="string">us</merge>
 
-      <merge key="input.xkb_variant" type="string" />
+      <merge key="input.xkb.variant" type="string" />
     </match>
   </device>
 </deviceinfo>
diff-tree 838e59c02ec06446fc180fb9d86fa8793c7b9903 (from b4193a2eee80895c5641e77488df0e72a73a3d99)
Author: Daniel Stone <daniel at fooishbar.org>
Date:   Mon Aug 6 16:07:20 2007 +0300

    configure.ac: Add $CONFIG_LIB to server libraries
    
    Make sure all DDXes get $CONFIG_LIB.  Build-tested with Xvfb and Xdmx.

diff --git a/configure.ac b/configure.ac
index f1e396e..0544a54 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1151,7 +1151,7 @@ if test "x$DMX" = xyes; then
 		              modules not found.])
 	fi
 	DMX_INCLUDES="$XEXT_INC $RENDER_INC $XTRAP_INC $RECORD_INC"
-	XDMX_LIBS="$FB_LIB $MI_LIB $XEXT_LIB $RENDER_LIB $XTRAP_LIB $RECORD_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $OS_LIB $CWRAP_LIB"
+	XDMX_LIBS="$FB_LIB $MI_LIB $XEXT_LIB $CONFIG_LIB $RENDER_LIB $XTRAP_LIB $RECORD_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $OS_LIB $CWRAP_LIB"
 	AC_SUBST([XDMX_LIBS])
 
 dnl USB sources in DMX require <linux/input.h>
@@ -1234,7 +1234,7 @@ AC_MSG_RESULT([$XGL])
 AM_CONDITIONAL(XGL, [test "x$XGL" = xyes])
 
 if test "x$XGL" = xyes; then
-	XGL_LIBS="$FB_LIB $MI_LIB $COMPOSITE_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $MIEXT_LAYER_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $XPSTUBS_LIB $CWRAP_LIB $OS_LIB"
+	XGL_LIBS="$FB_LIB $MI_LIB $COMPOSITE_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $MIEXT_LAYER_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $XPSTUBS_LIB $CWRAP_LIB $OS_LIB"
 	AC_SUBST([XGL_LIBS])
 	AC_DEFINE(XGL_MODULAR, 1, [Use loadable XGL modules])
 
@@ -1255,7 +1255,7 @@ AC_MSG_RESULT([$XEGL])
 AM_CONDITIONAL(XEGL, [test "x$XEGL" = xyes])
 
 if test "x$XEGL" = xyes; then
-	XEGL_LIBS="$FB_LIB $MI_LIB $COMPOSITE_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $MIEXT_LAYER_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $XPSTUBS_LIB $CWRAP_LIB $OS_LIB"
+	XEGL_LIBS="$FB_LIB $MI_LIB $COMPOSITE_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $MIEXT_LAYER_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $XPSTUBS_LIB $CWRAP_LIB $OS_LIB"
 	AC_SUBST([XEGL_LIBS])
 fi
 
@@ -1271,7 +1271,7 @@ AC_MSG_RESULT([$XGLX])
 AM_CONDITIONAL(XGLX, [test "x$XGLX" = xyes])
 
 if test "x$XGLX" = xyes; then
-	XGLX_LIBS="$FB_LIB $MI_LIB $COMPOSITE_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $MIEXT_LAYER_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $XPSTUBS_LIB $CWRAP_LIB $OS_LIB"
+	XGLX_LIBS="$FB_LIB $MI_LIB $COMPOSITE_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $MIEXT_LAYER_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $XPSTUBS_LIB $CWRAP_LIB $OS_LIB"
 	AC_SUBST([XGLX_LIBS])
 fi
 
@@ -1335,7 +1335,7 @@ return 0;}
 #               LDFLAGS=$save_LDFLAGS
 #               ])
                xorg_cv_AGL_framework=no
-	       DARWIN_LIBS="$FB_LIB $MI_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $XPSTUBS_LIB $OS_LIB"
+	       DARWIN_LIBS="$FB_LIB $MI_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $XPSTUBS_LIB $OS_LIB"
 	       AC_SUBST([DARWIN_LIBS])
                AC_CHECK_LIB([Xplugin],[xp_init],[:])
                AC_SUBST([APPLE_APPLICATIONS_DIR])
@@ -1633,8 +1633,8 @@ AC_MSG_RESULT([$XPRINT])
 
 if test "x$XPRINT" = xyes; then
 	PKG_CHECK_MODULES([XPRINT], [printproto x11 xfont $XDMCP_MODULES xau $PIXMAN])
-	XPRINT_EXTENSIONS="$XEXT_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $RENDER_LIB $COMPOSITE_LIB $RANDR_LIB $XI_LIB $FIXES_LIB $DAMAGE_LIB $XI_LIB $GLX_LIBS"
-	XPRINT_LIBS="$DIX_LIB $CONFIG_LIB $XKB_LIB $XKB_STUB_LIB $XPRINT_EXTENSIONS $MI_LIB $MIEXT_DAMAGE_LIB $CWRAP_LIB $OS_LIB $LIBS $XPRINT_LIBS"
+	XPRINT_EXTENSIONS="$XEXT_LIB $CONFIG_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $RENDER_LIB $COMPOSITE_LIB $RANDR_LIB $XI_LIB $FIXES_LIB $DAMAGE_LIB $XI_LIB $GLX_LIBS"
+	XPRINT_LIBS="$DIX_LIB $XKB_LIB $XKB_STUB_LIB $XPRINT_EXTENSIONS $MI_LIB $MIEXT_DAMAGE_LIB $CWRAP_LIB $OS_LIB $LIBS $XPRINT_LIBS"
 	AC_SUBST([XPRINT_CFLAGS])
 	AC_SUBST([XPRINT_LIBS])
 
@@ -1689,7 +1689,7 @@ if test "x$XWIN" = xauto; then
 		mingw*) XWIN="yes" ;;
 		*) XWIN="no" ;;
 	esac
-	XWIN_LIBS="$FB_LIB $MI_LIB $XEXT_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $DAMAGE_LIB $LAYER_LIB $XPSTUBS_LIB $OS_LIB $SHADOW_LIB"
+	XWIN_LIBS="$FB_LIB $MI_LIB $XEXT_LIB $CONFIG_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $DAMAGE_LIB $LAYER_LIB $XPSTUBS_LIB $OS_LIB $SHADOW_LIB"
 	AC_SUBST([XWIN_LIBS])
 fi
 AC_MSG_RESULT([$XWIN])


More information about the xorg-commit mailing list