Addressing #7371: don't trigger session->undo() from non-GUI-thread
authorJohannes Mueller <github@johannes-mueller.org>
Sun, 25 Jun 2017 19:21:56 +0000 (21:21 +0200)
committerRobin Gareus <robin@gareus.org>
Fri, 30 Jun 2017 23:04:44 +0000 (01:04 +0200)
commitf7452c2a3a275356de32b4019a57034c7b8afe2f
treed7f79cedc38e4a162be9866945afb49a927ed9cd
parent02ed6130e40e1b0f401f0ea4c8bdec049800c153
Addressing #7371: don't trigger session->undo() from non-GUI-thread

When triggering Session::undo() or Session::redo() from a
non-GUI-thread (e.g. from a surface protocol) Ardour crashes if setting a
CairoWidget dirty due to a ENSURE_GUI_THREAD assertion. (see #7371)

By triggering undo by BasicUI::access_action() rather than by Session::undo()
we ensure that the GUI thread will finally call Session::undo().

So more like a workaround ... but better than crashing :)
libs/surfaces/control_protocol/basic_ui.cc