diff options
author | Carl Hetherington <carl@carlh.net> | 2011-07-11 12:57:17 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2011-07-11 12:57:17 +0000 |
commit | 58a700e96878ee5ea61388320c594addb4641bf2 (patch) | |
tree | 978818e4544f65ef93af3f8825fc409f2a7e6666 /gtk2_ardour/time_axis_view.cc | |
parent | 4ef2541e6e390a2b019448a11462cba620d47e94 (diff) |
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
Diffstat (limited to 'gtk2_ardour/time_axis_view.cc')
-rw-r--r-- | gtk2_ardour/time_axis_view.cc | 13 |
1 files changed, 11 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() */ |