summaryrefslogtreecommitdiff
path: root/gtk2_ardour
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2011-12-26 23:18:24 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2011-12-26 23:18:24 +0000
commit7856f14c44bf73f08bf37ad57271d691b8a410a3 (patch)
tree377be7b0e102d7fffca19d0137af6cbbe9fd0de7 /gtk2_ardour
parent2b4d07e3042683ad3c2bd37f216aa724c2ffdc15 (diff)
when a context click event occurs in the editor, store the event so we can use it to determine position later during its handling, if necessary
git-svn-id: svn://localhost/ardour2/branches/3.0@11081 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour')
-rw-r--r--gtk2_ardour/editor.h4
-rw-r--r--gtk2_ardour/editor_mouse.cc2
2 files changed, 5 insertions, 1 deletions
diff --git a/gtk2_ardour/editor.h b/gtk2_ardour/editor.h
index 9fa45ba85d..9ecc9c5da6 100644
--- a/gtk2_ardour/editor.h
+++ b/gtk2_ardour/editor.h
@@ -679,6 +679,8 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
Gtk::Menu * track_edit_playlist_submenu;
Gtk::Menu * track_selection_edit_playlist_submenu;
+ GdkEvent context_click_event;
+
void popup_track_context_menu (int, int, ItemType, bool);
Gtk::Menu* build_track_context_menu ();
Gtk::Menu* build_track_bus_context_menu ();
@@ -1099,7 +1101,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
void toggle_region_lock_style ();
void raise_region ();
void raise_region_to_top ();
- void change_region_layering_order ();
+ void change_region_layering_order (bool from_context_menu);
void lower_region ();
void lower_region_to_bottom ();
void split_regions_at (framepos_t, RegionSelection&);
diff --git a/gtk2_ardour/editor_mouse.cc b/gtk2_ardour/editor_mouse.cc
index 3d61089d9a..a7c3946ff3 100644
--- a/gtk2_ardour/editor_mouse.cc
+++ b/gtk2_ardour/editor_mouse.cc
@@ -1300,6 +1300,8 @@ Editor::button_release_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemT
if (Keyboard::is_context_menu_event (&event->button)) {
+ context_click_event = *event;
+
if (!_drags->active ()) {
/* no matter which button pops up the context menu, tell the menu