Obtains the number of currently open windowsint sm_wcount(void);
sm_wcountreturns the number of windows currently open. The number is equivalent to the number of windows in the window stack, excluding the base window.
Use this function with
sm_wselectto activate another window from the window stack. For example, the following statement selects the screen beneath the current window:sm_wselect(sm_wcount()-1);