1276N/A@@ -225,7 +225,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;
1340N/Aindex 7e30755..5c008e4 100644
1340N/A@@ -371,6 +371,10 @@ Mask PropagateMask[EMASKSIZE];
1340N/A DevPrivateKeyRec XIClientPrivateKeyRec;
1088N/A+DevPrivateKeyRec HotkeyMapDevicePrivateKeyRec;
1088N/A /*****************************************************************
1340N/A * Declarations of local routines.
1276N/A@@ -1260,6 +1264,11 @@ XInputExtensionInit(void)
1276N/A (&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");
1340N/Aindex 2ead556..9de9dfc 100644
1276N/A@@ -123,6 +123,49 @@ get_prop_string_array(LibHalContext * hal_ctx, const char *udi,
764N/A+add_extra_device(char *driver)
764N/A+ char *config_info = NULL;
1265N/A+ InputOption *input_options = NULL;
1088N/A+ InputAttributes attrs = {0};
1265N/A+ input_options = input_option_new(input_options, "driver", driver);
1265N/A+ input_options = input_option_new(input_options, "name", driver);
1265N/A+ if (!asprintf(&config_info, "hal:%s", driver) == -1) {
764N/A+ /* Check for duplicate devices */
764N/A+ if (device_is_duplicate(config_info))
1265N/A+ if (NewInputDeviceRequest(input_options, &attrs, &dev) != Success) {
764N/A+ dev->config_info = xstrdup(config_info);
1265N/A+ input_option_free_list(&input_options);
1276N/A device_added(LibHalContext * hal_ctx, const char *udi)
1276N/A@@ -382,6 +425,14 @@ device_added(LibHalContext * hal_ctx, const char *udi)
1265N/A input_options = input_option_new(input_options, "config_info", config_info);
1265N/A+ InputOption *md = input_option_find(input_options, "mdriver");
1312N/A+ char *mdriver = input_option_get_value(md);
1265N/A+ add_extra_device (mdriver);
764N/A /* this isn't an error, but how else do you output something that the user can see? */
1265N/A if ((rc = NewInputDeviceRequest(input_options, &attrs, &dev)) != Success) {
1124N/Aindex b263f36..425aec2 100644
764N/A <!-- If we're using Linux, we use evdev by default (falling back to
1340N/Aindex 5a38924..263b1b1 100644
1276N/A@@ -57,6 +57,11 @@ SOFTWARE.
1088N/A+extern _X_EXPORT DevPrivateKeyRec HotkeyMapDevicePrivateKeyRec;
1088N/A+#define HotkeyMapDevicePrivateKey (&HotkeyMapDevicePrivateKeyRec)
1265N/A #define BitIsOn(ptr, bit) (!!(((const 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)))