Minimum dimensions of a window should be determined relative to the dimensions of the screen.

This commit also fixes a problem where windows cannot be resized to fill the full dimensions of the screen.