diff options
author | Carl Hetherington <carl@carlh.net> | 2011-12-07 01:44:47 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2011-12-07 01:44:47 +0000 |
commit | 668c8b1f9e1df57e749e93953918832a38b17e23 (patch) | |
tree | ad16fe6c9874e19736612b1dd39838c0867a71b3 /gtk2_ardour/port_matrix_grid.cc | |
parent | 790d9042c644843f8105c714fad641dd17b7d722 (diff) |
Pass whole GdkEventButton into port matrix button
press/release handlers, rather than just selected
highlights. Remove port in the port matrix on Keyboard
is_delete_event (part of #4536).
git-svn-id: svn://localhost/ardour2/branches/3.0@10920 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/port_matrix_grid.cc')
-rw-r--r-- | gtk2_ardour/port_matrix_grid.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/gtk2_ardour/port_matrix_grid.cc b/gtk2_ardour/port_matrix_grid.cc index a4ca3df1b8..daa25139dc 100644 --- a/gtk2_ardour/port_matrix_grid.cc +++ b/gtk2_ardour/port_matrix_grid.cc @@ -312,12 +312,12 @@ PortMatrixGrid::position_to_node (double x, double y) const } void -PortMatrixGrid::button_press (double x, double y, int b, uint32_t t, guint) +PortMatrixGrid::button_press (double x, double y, GdkEventButton* ev) { ARDOUR::BundleChannel const px = position_to_channel (x, y, _matrix->visible_columns()); ARDOUR::BundleChannel const py = position_to_channel (y, x, _matrix->visible_rows()); - if (b == 1) { + if (ev->button == 1) { _dragging = true; _drag_valid = (px.bundle && py.bundle); @@ -326,9 +326,9 @@ PortMatrixGrid::button_press (double x, double y, int b, uint32_t t, guint) _drag_start_x = x / grid_spacing (); _drag_start_y = y / grid_spacing (); - } else if (b == 3) { + } else if (ev->button == 3) { - _matrix->popup_menu (px, py, t); + _matrix->popup_menu (px, py, ev->time); } } @@ -366,9 +366,9 @@ PortMatrixGrid::set_association (PortMatrixNode node, bool s) } void -PortMatrixGrid::button_release (double x, double y, int b, uint32_t /*t*/, guint s) +PortMatrixGrid::button_release (double x, double y, GdkEventButton* ev) { - if (b == 1) { + if (ev->button == 1) { if (x != -1) { @@ -387,7 +387,7 @@ PortMatrixGrid::button_release (double x, double y, int b, uint32_t /*t*/, guint } else { - if (Keyboard::modifier_state_equals (s, Keyboard::PrimaryModifier)) { + if (Keyboard::modifier_state_equals (ev->state, Keyboard::PrimaryModifier)) { /* associate/disassociate things diagonally down and right until we run out */ PortMatrixNode::State s = (PortMatrixNode::State) 0; while (1) { |