Date: Thu, 3 Dec 2009 16:48:51 GMT From: Andreas Wetzel <mickey242@gmx.net> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/141143: x11/gdm: gdm ignores keyboard variant configured via HAL Message-ID: <200912031648.nB3GmpOM053459@www.freebsd.org> Resent-Message-ID: <200912031650.nB3Go23J055313@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 141143 >Category: ports >Synopsis: x11/gdm: gdm ignores keyboard variant configured via HAL >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Dec 03 16:50:02 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Andreas Wetzel >Release: 8.0-RELEASE >Organization: >Environment: FreeBSD gunhead.enforcer.cc 8.0-RELEASE FreeBSD 8.0-RELEASE #0: Tue Dec 1 01:19:18 CET 2009 root@gunhead.enforcer.cc:/usr/obj/usr/src/sys/GUNHEAD i386 >Description: gdm reads the keyboard layout from HAL, but ignores the selected keyboard variant, i.e. 'nodeadkeys'. >How-To-Repeat: - Configure a keyboard layout and variant via HAL (input.x11_options.XkbLayout, input.x11_options.XkbVariant) - Start gdm - The keyboard layout field will only contain the layout selected via HAL, not the variant. >Fix: Patch attached with submission follows: --- daemon/gdm-session-direct.c.orig 2009-12-02 15:15:33.000000000 +0100 +++ daemon/gdm-session-direct.c 2009-12-02 15:15:41.000000000 +0100 @@ -608,6 +608,7 @@ char **devices; int n_devices; char *layout; + char *variant; char *result; result = NULL; @@ -635,8 +636,26 @@ "input.xkb.layout", NULL); } - result = g_strdup (layout); + + variant = libhal_device_get_property_string (ctx, + devices[0], + "input.x11_options.XkbVariant", + NULL); + + if (!variant) { + variant = libhal_device_get_property_string (ctx, + devices[0], + "input.xkb.variant", + NULL); + } + + if(layout && variant) + result = g_strdup_printf("%s\t%s", layout, variant); + else + result = g_strdup (layout); + libhal_free_string (layout); + libhal_free_string (variant); } libhal_free_string_array (devices); >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200912031648.nB3GmpOM053459>