⌘W always worked in my Safari like this:
- it closes all tabs
- if there's no tab, it closes the window.
Now, #2 is not working anymore.
Go to your
Without knowing what other applications you're running, that's the first place I can think of to check what might be intercepting it.