[powerdebug 12/14] make 'selectedwindow' variable static