summaryrefslogtreecommitdiff
path: root/gtk2_ardour/port_matrix_body.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2009-02-02 13:59:50 +0000
committerCarl Hetherington <carl@carlh.net>2009-02-02 13:59:50 +0000
commit23e7641a9bfa22db4e776dada6a98c55a40f9792 (patch)
treeae911fb8f8adbe2a1fe14a6af87704f63f3eff19 /gtk2_ardour/port_matrix_body.cc
parent018fff15ef766bb2a199441a7912fb8ab9984c72 (diff)
Fix up mouseover handling in the port matrix.
git-svn-id: svn://localhost/ardour2/branches/3.0@4478 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/port_matrix_body.cc')
-rw-r--r--gtk2_ardour/port_matrix_body.cc23
1 files changed, 7 insertions, 16 deletions
diff --git a/gtk2_ardour/port_matrix_body.cc b/gtk2_ardour/port_matrix_body.cc
index a16e893ee3..590ab15669 100644
--- a/gtk2_ardour/port_matrix_body.cc
+++ b/gtk2_ardour/port_matrix_body.cc
@@ -29,11 +29,10 @@ PortMatrixBody::PortMatrixBody (PortMatrix* p)
_row_labels (p, this),
_grid (p, this),
_xoffset (0),
- _yoffset (0),
- _pointer_inside (false)
+ _yoffset (0)
{
modify_bg (Gtk::STATE_NORMAL, Gdk::Color ("#00000"));
- add_events (Gdk::ENTER_NOTIFY_MASK | Gdk::LEAVE_NOTIFY_MASK | Gdk::POINTER_MOTION_MASK);
+ add_events (Gdk::LEAVE_NOTIFY_MASK | Gdk::POINTER_MOTION_MASK);
}
@@ -263,13 +262,7 @@ PortMatrixBody::setup ()
_row_labels.setup ();
_grid.setup ();
- set_mouseover (
- PortMatrixNode (
- ARDOUR::BundleChannel (boost::shared_ptr<ARDOUR::Bundle> (), 0),
- ARDOUR::BundleChannel (boost::shared_ptr<ARDOUR::Bundle> (), 0)
- )
- );
-
+ set_mouseover (PortMatrixNode ());
compute_rectangles ();
}
@@ -365,12 +358,10 @@ PortMatrixBody::rebuild_and_draw_row_labels ()
}
bool
-PortMatrixBody::on_enter_notify_event (GdkEventCrossing* ev)
+PortMatrixBody::on_leave_notify_event (GdkEventCrossing* ev)
{
- if (ev->type == GDK_ENTER_NOTIFY) {
- _pointer_inside = true;
- } else if (ev->type == GDK_LEAVE_NOTIFY) {
- _pointer_inside = false;
+ if (ev->type == GDK_LEAVE_NOTIFY) {
+ set_mouseover (PortMatrixNode ());
}
return true;
@@ -379,7 +370,7 @@ PortMatrixBody::on_enter_notify_event (GdkEventCrossing* ev)
bool
PortMatrixBody::on_motion_notify_event (GdkEventMotion* ev)
{
- if (_pointer_inside && Gdk::Region (_grid.parent_rectangle()).point_in (ev->x, ev->y)) {
+ if (Gdk::Region (_grid.parent_rectangle()).point_in (ev->x, ev->y)) {
_grid.mouseover_event (
_grid.parent_to_component_x (ev->x),
_grid.parent_to_component_y (ev->y)