diff options
-rw-r--r-- | gtk2_ardour/time_axis_view.cc | 13 | ||||
-rw-r--r-- | gtk2_ardour/time_axis_view.h | 1 |
2 files changed, 12 insertions, 2 deletions
diff --git a/gtk2_ardour/time_axis_view.cc b/gtk2_ardour/time_axis_view.cc index a37a6ac9d0..85535ca82d 100644 --- a/gtk2_ardour/time_axis_view.cc +++ b/gtk2_ardour/time_axis_view.cc @@ -163,6 +163,7 @@ TimeAxisView::TimeAxisView (ARDOUR::Session* sess, PublicEditor& ed, TimeAxisVie controls_ebox.signal_button_press_event().connect (sigc::mem_fun (*this, &TimeAxisView::controls_ebox_button_press)); controls_ebox.signal_button_release_event().connect (sigc::mem_fun (*this, &TimeAxisView::controls_ebox_button_release)); controls_ebox.signal_motion_notify_event().connect (sigc::mem_fun (*this, &TimeAxisView::controls_ebox_motion)); + controls_ebox.signal_leave_notify_event().connect (sigc::mem_fun (*this, &TimeAxisView::controls_ebox_leave)); controls_ebox.show (); controls_hbox.pack_start (controls_ebox, true, true); @@ -389,8 +390,6 @@ TimeAxisView::controls_ebox_motion (GdkEventMotion* ev) _resize_drag_start = ev->y_root; } else { /* not dragging but ... */ - Glib::RefPtr<Gdk::Window> win = controls_ebox.get_window(); - maybe_set_cursor (ev->y); } @@ -398,6 +397,16 @@ TimeAxisView::controls_ebox_motion (GdkEventMotion* ev) } bool +TimeAxisView::controls_ebox_leave (GdkEventCrossing* ev) +{ + if (_have_preresize_cursor) { + gdk_window_set_cursor (controls_ebox.get_window()->gobj(), _preresize_cursor); + _have_preresize_cursor = false; + } + return true; +} + +bool TimeAxisView::maybe_set_cursor (int y) { /* XXX no Gtkmm Gdk::Window::get_cursor() */ diff --git a/gtk2_ardour/time_axis_view.h b/gtk2_ardour/time_axis_view.h index 8a354abcd2..efdb2606ed 100644 --- a/gtk2_ardour/time_axis_view.h +++ b/gtk2_ardour/time_axis_view.h @@ -239,6 +239,7 @@ class TimeAxisView : public virtual AxisView virtual bool controls_ebox_scroll (GdkEventScroll*); virtual bool controls_ebox_button_press (GdkEventButton*); virtual bool controls_ebox_motion (GdkEventMotion*); + virtual bool controls_ebox_leave (GdkEventCrossing*); /** Display the standard LHS control menu at when. * |