Minimize/maximize psychopy window to perform eyetracker calibration

This is what psychopy 2021.2.3 uses to minimize / maximize a window on Windows 10:

# minimize the PsychoPy window
win.winHandle.minimize() 
win.winHandle.set_fullscreen(False)
# maximize the PsychoPy window
win.winHandle.set_fullscreen(True)
win.winHandle.maximize()

After maximiizing the window you may need to (re)draw stim and flip before the window graphics are visible.

If you are running your own python env, pyglet 1.4.11 is needed on Windows. This functionailty seems to no longer work in the latest pyglet release.

This is only needed on Windows; macOS and Linux seem to handle showing the calibration window on top of the psychopy window without needing to minimize it.

Thank you

2 Likes