Even within the client area, the browser leaves margins around the picture. Both the left margin and top margin take away spaces. To make it looks nice, you probably want to add bottom margin and right margin, so that the picture is centered.
As the sizes of the title bar, borders and margins are fixed, so it is very easy for you to calculate window sizes in your javascript:
window_width = 2 * BORDER_SIZE + 2 * LEFT_MARGIN
window_height = TITLE_BAR_HEIGHT + BORDER_SIZE + 2 * TOP_MARGIN
|