MATLAB Programming/Psychtoolbox/Screen Commands/GetFrontWindow

Usage:

[windowPtr,rect]=Screen('GetFrontWindow')

Get window pointer for frontmost window.