To make things clearer, I should have written "canvas" instead of "window".