mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 19:42:05 +00:00
clutter/x11: Set master device on pad button events
These should be set one, but just set the master to be the slave pad device. We are passively grabbing the pad device, so this is consistent with active grabs on slave devices. Besides, pads are paired to the VCP, which is not really truthful. Fixes inoffensive warnings when trying to check whether motion throttling applies for these events. https://bugzilla.gnome.org/show_bug.cgi?id=784881
This commit is contained in:
parent
10b30eaba5
commit
56c468a2ef
@ -436,6 +436,9 @@ create_device (ClutterDeviceManagerXI2 *manager_xi2,
|
|||||||
node_path = get_device_node_path (backend_x11, info);
|
node_path = get_device_node_path (backend_x11, info);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (source == CLUTTER_PAD_DEVICE)
|
||||||
|
is_enabled = TRUE;
|
||||||
|
|
||||||
retval = g_object_new (CLUTTER_TYPE_INPUT_DEVICE_XI2,
|
retval = g_object_new (CLUTTER_TYPE_INPUT_DEVICE_XI2,
|
||||||
"name", info->name,
|
"name", info->name,
|
||||||
"id", info->deviceid,
|
"id", info->deviceid,
|
||||||
@ -1224,6 +1227,7 @@ clutter_device_manager_xi2_translate_event (ClutterEventTranslator *translator,
|
|||||||
|
|
||||||
/* Pad buttons are 0-indexed */
|
/* Pad buttons are 0-indexed */
|
||||||
event->pad_button.button = xev->detail - 1;
|
event->pad_button.button = xev->detail - 1;
|
||||||
|
clutter_event_set_device (event, device);
|
||||||
clutter_event_set_source_device (event, source_device);
|
clutter_event_set_source_device (event, source_device);
|
||||||
|
|
||||||
CLUTTER_NOTE (EVENT,
|
CLUTTER_NOTE (EVENT,
|
||||||
|
Loading…
Reference in New Issue
Block a user