[[ Bug 12939 ]] Either runModalSession or nextEventMatchingMask.
Merge branch 'bugfix-12939' into develop