Could you be more specific on the issue? The size of a window always includes its borders to ensure a proper positioning of the window on the desktop. On the other hand, the size of its content can be computed using the size of its item which will naturally expand to the inner side of the window. Is there something we are missing?