+ gint x,y;
+ Gdk::ModifierType state;
+
+ /* need to use the correct x,y, the event lies */
+ time_canvas_event_box.get_window()->get_pointer (x, y, state);
+
+ nframes_t where = leftmost_frame + pixel_to_frame (x);
+
+ switch (ev->button) {
+ case 1:
+ // Since we are about to move the playhead, cancel any running
+ // auditions.
+ if (session->is_auditioning()) {
+ session->cancel_audition ();
+ }
+ /* transport playhead */
+ snap_to (where);
+ session->request_locate (where);
+ _dragging_playhead = true;
+ break;
+
+ case 2:
+ /* edit cursor */
+ if (snap_type != Editing::SnapToEditCursor) {
+ snap_to (where);
+ }
+ edit_cursor->set_position (where);
+ edit_cursor_clock.set (where);
+ break;
+
+ default:
+ break;
+ }
+