Use `msg.window` instead of `window`