From 76d48f79d655095b89afef6211a61aae834da805 Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Fri, 25 Apr 2014 20:03:09 +0200 Subject: [PATCH] evdev: Set core device on translated events And ensure the core pointer shares the same stage than the slave device when those events are set. This fixes problems on the evdev backend where the last touch unsets the stage on the device, but nothing sets it back afterwards. https://bugzilla.gnome.org/show_bug.cgi?id=728968 --- clutter/evdev/clutter-device-manager-evdev.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/clutter/evdev/clutter-device-manager-evdev.c b/clutter/evdev/clutter-device-manager-evdev.c index aa4dc23a3..211bfaf69 100644 --- a/clutter/evdev/clutter-device-manager-evdev.c +++ b/clutter/evdev/clutter-device-manager-evdev.c @@ -380,8 +380,11 @@ notify_absolute_motion (ClutterInputDevice *input_device, _clutter_xkb_translate_state (event, seat->xkb, seat->button_state); event->motion.x = x; event->motion.y = y; + clutter_event_set_device (event, seat->core_pointer); clutter_event_set_source_device (event, input_device); + _clutter_input_device_set_stage (seat->core_pointer, stage); + queue_event (event); } @@ -456,6 +459,7 @@ notify_scroll (ClutterInputDevice *input_device, clutter_input_device_get_coords (seat->core_pointer, NULL, &point); event->scroll.x = point.x; event->scroll.y = point.y; + clutter_event_set_device (event, seat->core_pointer); clutter_event_set_source_device (event, input_device); queue_event (event); @@ -535,6 +539,7 @@ notify_button (ClutterInputDevice *input_device, clutter_input_device_get_coords (seat->core_pointer, NULL, &point); event->button.x = point.x; event->button.y = point.y; + clutter_event_set_device (event, seat->core_pointer); clutter_event_set_source_device (event, input_device); queue_event (event);