1124N/Aindex 327873e..717f275 100644
1124N/A@@ -187,7 +187,16 @@ CopyKeyClass(DeviceIntPtr device, DeviceIntPtr master)
851N/A KeyClassPtr mk = master->key;
764N/A+ DeviceIntPtr mdev = dixLookupPrivate(&master->devPrivates,
764N/A+ HotkeyMapDevicePrivateKey);
851N/A+ if ((device == master) || (device == mdev))
851N/A mk->sourceid = device->id;
1124N/Aindex 82df7eb..6b99fae 100644
1088N/A@@ -371,6 +371,10 @@ extern XExtensionVersion XIVersion;
1088N/A Mask PropagateMask[MAXDEVICES];
1088N/A+DevPrivateKeyRec HotkeyMapDevicePrivateKeyRec;
1088N/A /*****************************************************************
1088N/A@@ -1255,6 +1259,11 @@ XInputExtensionInit(void)
1088N/A if (!dixRegisterPrivateKey(&XIClientPrivateKeyRec, PRIVATE_CLIENT, sizeof(XIClientRec)))
1088N/A FatalError("Cannot request private for XI.\n");
1088N/A+ if (!dixRegisterPrivateKey(&HotkeyMapDevicePrivateKeyRec, PRIVATE_DEVICE, 0))
1088N/A+ FatalError("Cannot request private for hotkey.\n");
1088N/A if (!AddCallback(&ClientStateCallback, XIClientCallback, 0))
1088N/A FatalError("Failed to add callback to XI.\n");
1124N/Aindex 297520a..44c1582 100644
1124N/A@@ -123,6 +123,63 @@ get_prop_string_array(LibHalContext *hal_ctx, const char *udi, const char *prop)
764N/A+add_extra_device(char *driver)
764N/A+ char *config_info = NULL;
764N/A+ InputOption *options = NULL, *tmpo = NULL;
1088N/A+ InputAttributes attrs = {0};
764N/A+ options = xcalloc(sizeof(*options), 1);
764N/A+ LogMessage(X_ERROR, "
config/hal: couldn't allocate space for input options!\n");
764N/A+ options->key = xstrdup("_source");
764N/A+ if (!options->key || !options->value) {
764N/A+ add_option(&options, "driver", driver);
764N/A+ add_option(&options, "name", driver);
764N/A+ config_info = xalloc(strlen(driver) + 5); /* "hal:" and NULL */
764N/A+ sprintf(config_info, "hal:%s", driver);
764N/A+ /* Check for duplicate devices */
764N/A+ if (device_is_duplicate(config_info))
1088N/A+ if (NewInputDeviceRequest(options, &attrs, &dev) != Success) {
764N/A+ dev->config_info = xstrdup(config_info);
764N/A+ while (!dev && (tmpo = options)) {
764N/A device_added(LibHalContext *hal_ctx, const char *udi)
1124N/A@@ -134,6 +191,9 @@ device_added(LibHalContext *hal_ctx, const char *udi)
764N/A struct xkb_options xkb_opts = {0};
764N/A LibHalPropertySet *set = NULL;
764N/A LibHalPropertySetIterator set_iter;
1124N/A@@ -377,6 +437,16 @@ device_added(LibHalContext *hal_ctx, const char *udi)
1124N/A add_option(&options, "config_info", config_info);
764N/A+ for (tmpo = options; tmpo; tmpo = tmpo->next) {
764N/A+ if (!strcmp(tmpo->key, "mdriver") && (tmpo->value))
764N/A+ mdriver = tmpo->value;
764N/A+ add_extra_device (mdriver);
764N/A /* this isn't an error, but how else do you output something that the user can see? */
1088N/A if ((rc = NewInputDeviceRequest(options, &attrs, &dev)) != Success) {
1124N/Aindex b263f36..425aec2 100644
764N/A <!-- If we're using Linux, we use evdev by default (falling back to
1124N/Aindex b74ee04..808f36f 100644
1088N/A@@ -57,6 +57,11 @@ SOFTWARE.
1088N/A+extern _X_EXPORT DevPrivateKeyRec HotkeyMapDevicePrivateKeyRec;
1088N/A+#define HotkeyMapDevicePrivateKey (&HotkeyMapDevicePrivateKeyRec)
1088N/A #define BitIsOn(ptr, bit) (!!(((BYTE *) (ptr))[(bit)>>3] & (1 << ((bit) & 7))))
851N/A #define SetBit(ptr, bit) (((BYTE *) (ptr))[(bit)>>3] |= (1 << ((bit) & 7)))
851N/A #define ClearBit(ptr, bit) (((BYTE *)(ptr))[(bit)>>3] &= ~(1 << ((bit) & 7)))