diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2015-01-24 12:26:58 -0500 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2015-01-24 12:26:58 -0500 |
commit | 22435bb53d31d15870985aef23630ad20b6973e9 (patch) | |
tree | 9e939770db2b1d87940bd911c8c8a360e2a4ca7a /gtk2_ardour/editor_canvas.cc | |
parent | b4e32cd94b2bb37b3b61f465d9c90e6b2a208ab4 (diff) |
make MouseCursors invalid cursor API be static; use to initialize default cursor value in Drag API; use C API to set canvas cursor
Diffstat (limited to 'gtk2_ardour/editor_canvas.cc')
-rw-r--r-- | gtk2_ardour/editor_canvas.cc | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/gtk2_ardour/editor_canvas.cc b/gtk2_ardour/editor_canvas.cc index 4a5378f145..c1929bd38b 100644 --- a/gtk2_ardour/editor_canvas.cc +++ b/gtk2_ardour/editor_canvas.cc @@ -1013,7 +1013,14 @@ Editor::set_canvas_cursor (Gdk::Cursor* cursor) Glib::RefPtr<Gdk::Window> win = _track_canvas->get_window(); if (win && !_cursors->is_invalid (cursor)) { - win->set_cursor (*cursor); + /* glibmm 2.4 doesn't allow null cursor pointer because it uses + a Gdk::Cursor& as the argument to Gdk::Window::set_cursor(). + But a null pointer just means "use parent window cursor", + and so should be allowed. Gtkmm 3.x has fixed this API. + + For now, drop down and use C API + */ + gdk_window_set_cursor (win->gobj(), cursor ? cursor->gobj() : 0); } } @@ -1095,7 +1102,7 @@ Editor::which_trim_cursor (bool left) const Gdk::Cursor* Editor::which_mode_cursor () const { - Gdk::Cursor* mode_cursor = _cursors->invalid_cursor (); + Gdk::Cursor* mode_cursor = MouseCursors::invalid_cursor (); switch (mouse_mode) { case MouseRange: @@ -1161,7 +1168,7 @@ Editor::which_mode_cursor () const Gdk::Cursor* Editor::which_track_cursor () const { - Gdk::Cursor* cursor = _cursors->invalid_cursor(); + Gdk::Cursor* cursor = MouseCursors::invalid_cursor(); switch (_join_object_range_state) { case JOIN_OBJECT_RANGE_NONE: |