The
activate-pane
function gives the focus to a pane and brings the window containing it to the front.
This brings the window containing pane to the front, and gives the focus to the pane (or a sensible alternative inside the same interface if that pane cannot accept the focus).
This example demonstrates how to swap the focus from one window to another.
(setq text-input-pane
(capi:contain (make-instance
'capi:text-input-pane)))
(setq button
(capi:contain (make-instance
'capi:push-button
:text "Press Me")))
(capi:activate-pane text-input-pane)
(capi:activate-pane button)
hide-interface
raise-interface
set-object-automatic-resize
show-interface
quit-interface
simple-pane