Sorry to have to correct you Wims but...
That may work by happenstance if you only have a single window open and it's wid happens to match the cid, but not for multiple windows.
The command syntax is "/window -c @wid" so it only closes the matching window with that wid (tested on v7.83).