Context menus should (unless there is a very strong reason otherwise) be
popped up on button press, not button release. In addition Gtk::Menu::popup()
should be given the button ID of the button used, so that it can manage
both styles of menu interaction (press/drag/release and press/release/drag/press)
the rest from `tools/convert_boost.sh`.
* replace boost::function, boost::bind with std::function and std::bind.
This required some manual fixes, notably std::placeholders,
some static_casts<>, and boost::function::clear -> = {}.
This is necessary with clip recording because for some short time after recording,
a trigger may be playable despite not yet having a region.
GUI edition.
This fixes an issue where brining up a menu can directly activate an
action in the menu. Notably on macOS.
Nathan reports that this may also address #9515
Note: mac touchpads are not affected since right-click there is
effectively a "press and hold".
This is mostly a simple lexical search+replace but the absence of operator< for
std::weak_ptr<T> leads to some complications, particularly with Evoral::Sequence
and ExportPortChannel.
This will need some refinement, we should only copy the settings
if the file in question was previously auditioned, and perhaps
only if GMsynth.lv2 is used.
TriggerEntry has 3 child items:
* play-button, follow-button, name-button.
On mouse-down the TriggerEntry is grab()bed in preparation
to start a drag. From then on all events are directly sent to
TriggerEntry, which can only pass it up to parent items.
Mouse-release hence reaches the TriggerStrip and selects it.
This also changes TriggerBox Selection to act on release
(like all other selection). Otherwise strip selection will
de-select the TriggerBox on mouse-release.
During drag-motion callbacks the data to be dragged is n/a.
However we like to discriminate if drop is possible.
When dragging regions, the data-type of the region to be dragged
is unknown, so different `x-ardour/region` targets are not an
option, either.
Until a better option is presented, a static global is used
to set the data-type for region.pbdid drags.