panes: move to using custom events

(integrated from trunk branch change dd64960 by Todd Whiteman <toddw@activestate.com>)