From db97db25134f7b68d58577748dc584cf4f96e0d4 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Sat, 3 Jun 2023 15:13:04 +0200 Subject: [PATCH] Activate track-header context menu items with RBM Popup menu should handle the button that was used to show the popup menu. --- gtk2_ardour/time_axis_view.cc | 6 +++--- gtk2_ardour/time_axis_view.h | 8 ++------ 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/gtk2_ardour/time_axis_view.cc b/gtk2_ardour/time_axis_view.cc index 1e33237e84..f5b3042ff6 100644 --- a/gtk2_ardour/time_axis_view.cc +++ b/gtk2_ardour/time_axis_view.cc @@ -544,7 +544,7 @@ TimeAxisView::controls_ebox_button_release (GdkEventButton* ev) break; case 3: - popup_display_menu (ev->time); + popup_display_menu (3, ev->time); break; } @@ -767,14 +767,14 @@ TimeAxisView::conditionally_add_to_selection () } void -TimeAxisView::popup_display_menu (guint32 when) +TimeAxisView::popup_display_menu (int button, guint32 when) { conditionally_add_to_selection (); build_display_menu (); if (!display_menu->items().empty()) { - display_menu->popup (1, when); + display_menu->popup (button, when); } } diff --git a/gtk2_ardour/time_axis_view.h b/gtk2_ardour/time_axis_view.h index c5b8102a8c..6fa24a6334 100644 --- a/gtk2_ardour/time_axis_view.h +++ b/gtk2_ardour/time_axis_view.h @@ -285,12 +285,6 @@ protected: virtual bool controls_ebox_motion (GdkEventMotion*); virtual bool controls_ebox_leave (GdkEventCrossing*); - /** Display the standard LHS control menu at when. - * - * @param when the popup activation time - */ - virtual void popup_display_menu (guint32 when); - /** Build the standard LHS control menu. * Subclasses should extend this method to add their own menu options. */ @@ -336,6 +330,8 @@ private: void compute_heights (); bool maybe_set_cursor (int y); + void popup_display_menu (int button, guint32 when); + }; /* class TimeAxisView */