Flash window based on WindowState

Closes #23.