1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-17 08:01:36 +00:00

When changing the input.device property we need to remove the property

first.  If we don't, consumers seem to get the old value.  This seems to
make Xorg happy with mouse detection now.  This should work with or
without moused enabled.

Approved by:	marcus, garga (mentor, implicit)
This commit is contained in:
Robert Noland 2009-01-24 07:26:34 +00:00
parent e86b88ec45
commit 4b892eb230
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=226760
3 changed files with 9 additions and 26 deletions

View File

@ -8,7 +8,7 @@
PORTNAME= hal
DISTVERSION= 0.5.11
PORTREVISION= 12
PORTREVISION= 13
CATEGORIES= sysutils
MASTER_SITES= http://hal.freedesktop.org/releases/

View File

@ -1,5 +1,5 @@
--- fdi/policy/10osvendor/10-x11-input.fdi.orig 2008-09-24 14:32:26.000000000 +0100
+++ fdi/policy/10osvendor/10-x11-input.fdi 2008-09-24 14:34:22.000000000 +0100
--- fdi/policy/10osvendor/10-x11-input.fdi.orig 2008-05-07 19:21:15.000000000 -0400
+++ fdi/policy/10osvendor/10-x11-input.fdi 2009-01-23 18:20:10.000000000 -0500
@@ -1,19 +1,10 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<deviceinfo version="0.2">

View File

@ -1,6 +1,6 @@
--- hald/freebsd/addons/addon-mouse.c.orig 2008-12-21 01:15:41.000000000 -0500
+++ hald/freebsd/addons/addon-mouse.c 2008-12-21 01:17:03.000000000 -0500
@@ -0,0 +1,336 @@
--- hald/freebsd/addons/addon-mouse.c.orig 2009-01-24 02:12:21.000000000 -0500
+++ hald/freebsd/addons/addon-mouse.c 2009-01-24 02:14:11.000000000 -0500
@@ -0,0 +1,319 @@
+/***************************************************************************
+ * CVSID: $Id$
+ *
@ -52,7 +52,6 @@
+#define MOUSE_DRIVER "mouse"
+#define MOUSED_DEVICE "/dev/sysmouse"
+#define MOUSED_PROC_NAME "moused"
+#define XORG_PROC_NAME "Xorg"
+
+static struct
+{
@ -244,7 +243,6 @@
+static void
+poll_for_moused (void)
+{
+ char *driver;
+ char *old_device;
+ const char *device;
+ gboolean found;
@ -255,30 +253,15 @@
+ device = get_mouse_device(addon.device_file);
+ if (strcmp(old_device, device))
+ {
+ libhal_device_remove_property(hfp_ctx, hfp_udi, "input.device", &hfp_error);
+ dbus_error_free(&hfp_error);
+ libhal_device_set_property_string(hfp_ctx, hfp_udi, "input.device", device, &hfp_error);
+ dbus_error_free(&hfp_error);
+ }
+ g_free(old_device);
+
+ driver = libhal_device_get_property_string(hfp_ctx, hfp_udi, "input.x11_driver", &hfp_error);
+ libhal_device_set_property_string(hfp_ctx, hfp_udi, "input.x11_driver", MOUSE_DRIVER, &hfp_error);
+ dbus_error_free(&hfp_error);
+
+ found = (strcmp(device, MOUSED_DEVICE) == 0);
+ if (! found)
+ found = device_opened_by_proc(device, XORG_PROC_NAME);
+
+ if (found && driver)
+ {
+ libhal_device_remove_property(hfp_ctx, hfp_udi, "input.x11_driver", &hfp_error);
+ dbus_error_free(&hfp_error);
+ }
+ else if (! (found || driver))
+ {
+ libhal_device_set_property_string(hfp_ctx, hfp_udi, "input.x11_driver", MOUSE_DRIVER, &hfp_error);
+ dbus_error_free(&hfp_error);
+ }
+
+ g_free(driver);
+}
+
+int