> I do not see how the "perfect size" for an arbitrary window can possibly be within the window manager's capability to determine, unless the display device is so pixel-limited that the only sane size for any window is "fullscreen".
Hmm, my only clue comes from Java's Swing UI toolkit, where everything is a tree of nested components, each component having a "minimal" and "preferred" sizes. The containers derive their minimal and preferred sizes from the contained components and the layout manager in use. There is even an operation called "pack" that resizes the window according to the preferred sizes of its components. A tiling manager could use this information but it required cooperation from the toolkit.