- double wcx=0,wcy=0;
- double cx=0,cy=0;
-
- 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);
-
-
- track_canvas->c2w (x, y, wcx, wcy);
- track_canvas->w2c (wcx, wcy, cx, cy);
-
- nframes64_t where = leftmost_frame + pixel_to_frame (x);
-
- /// ripped from maybe_autoscroll, and adapted to work here
- nframes64_t rightmost_frame = leftmost_frame + current_page_frames ();
-
- jack_nframes_t frame = pixel_to_frame (cx);
-
- if (autoscroll_timeout_tag < 0) {
- if (frame > rightmost_frame) {
- if (rightmost_frame < max_frames) {
- start_canvas_autoscroll (1, 0);
- }
- } else if (frame < leftmost_frame) {
- if (leftmost_frame > 0) {
- start_canvas_autoscroll (-1, 0);
- }
- }
- } else {
- if (frame >= leftmost_frame && frame < rightmost_frame) {
- stop_canvas_autoscroll ();
- }
- }
- //////
-
- snap_to (where);
-
- Cursor* cursor = 0;
-
- switch (ruler_pressed_button) {
- case 1:
- /* transport playhead */
- cursor = playhead_cursor;
- break;
-
- case 2:
- /* edit point */
- // EDIT CURSOR XXX do something useful
- break;
-
- default:
- break;