[clutter-main] Fix the input device passed to set_motion_last_actor

In generate_enter_leave_events it passes the device pointer from the
event to set_motion_last_actor but it was reading it directly from
event->motion.device. However the function is also used to process
button events so it would read from the wrong location in this case.

The device location in the union happened to be in the same place as
the click_count field of ClutterButtonEvent so it only mattered if the
click_count is non-zero. The X11 backend doesn't set this but
Clutter-GTK does so it was causing a crash.
This commit is contained in:
Neil Roberts 2009-02-16 16:34:31 +00:00
parent 1fcddb3b10
commit 747233a8ac

View File

@ -1936,7 +1936,7 @@ generate_enter_leave_events (ClutterEvent *event)
}
}
set_motion_last_actor (motion_current_actor, event->motion.device);
set_motion_last_actor (motion_current_actor, device);
}
/**