Fix for issue 280. 

Code controlling creation of close box was nested in an if block which calculates the title bar size depending on whether there is a window title or not.