/* XXX really need to check if we are in the name highlight,
and proxy to that when required.
+
+ XXX or in the trim rectangles
*/
TimeAxisView& tv (xfv->get_time_axis_view());
/* we're in stacked mode; proxy to the region view under the mouse */
- /* XXX: FIXME: this is an evil hack; it assumes that any event for which
- this proxy is being used has its GdkEvent laid out such that the y
- member is in the same place as that for a GdkEventButton */
+ double cx = 0;
+ double cy = 0;
+ switch (event->type) {
+ case GDK_BUTTON_PRESS:
+ case GDK_BUTTON_RELEASE:
+ cx = event->button.x;
+ cy = event->button.y;
+ break;
+ case GDK_MOTION_NOTIFY:
+ cx = event->motion.x;
+ cy = event->motion.y;
+ break;
+ case GDK_ENTER_NOTIFY:
+ case GDK_LEAVE_NOTIFY:
+ cx = event->crossing.x;
+ cy = event->crossing.y;
+ break;
+ default:
+ /* XXX: this may be wrong for some events */
+ cx = event->button.x;
+ cy = event->button.y;
+ }
/* position of the event within the track */
- double cx = event->button.x;
- double cy = event->button.y;
atv->view()->canvas_item()->w2i (cx, cy);
/* hence layer that we're over */