fix click to start editing audio clocks that occurs right of the clock, which was previously a "dead zone". should fix part of #5160

git-svn-id: svn://localhost/ardour2/branches/3.0@13391 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis
2012-11-06 19:30:36 +00:00
parent 9943fffdf8
commit cb57b95480

View File

@@ -1534,17 +1534,19 @@ AudioClock::on_button_press_event (GdkEventButton *ev)
y = ev->y - ((upper_height - layout_height)/2);
x = ev->x - layout_x_offset;
if (_layout->xy_to_index (x * PANGO_SCALE, y * PANGO_SCALE, index, trailing)) {
drag_field = index_to_field (index);
dragging = true;
/* make absolutely sure that the pointer is grabbed */
gdk_pointer_grab(ev->window,false ,
GdkEventMask( Gdk::POINTER_MOTION_MASK | Gdk::BUTTON_PRESS_MASK |Gdk::BUTTON_RELEASE_MASK),
NULL,NULL,ev->time);
drag_accum = 0;
drag_start_y = ev->y;
drag_y = ev->y;
if (!_layout->xy_to_index (x * PANGO_SCALE, y * PANGO_SCALE, index, trailing)) {
/* pretend it is a character on the far right */
index = 99;
}
drag_field = index_to_field (index);
dragging = true;
/* make absolutely sure that the pointer is grabbed */
gdk_pointer_grab(ev->window,false ,
GdkEventMask( Gdk::POINTER_MOTION_MASK | Gdk::BUTTON_PRESS_MASK |Gdk::BUTTON_RELEASE_MASK),
NULL,NULL,ev->time);
drag_accum = 0;
drag_start_y = ev->y;
drag_y = ev->y;
}
break;