Change the cursor back from the track resize handle when

git-svn-id: svn://localhost/ardour2/branches/3.0@9837 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Carl Hetherington 2011-07-11 12:57:17 +00:00
parent 4ef2541e6e
commit 58a700e968
2 changed files with 12 additions and 2 deletions

View File

@ -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,14 +390,22 @@ 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);
}
return true;
}
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)
{

View File

@ -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.
*