From: "Zachary P. Landau" Date: 2004-03-18T17:11:04+09:00 Subject: Re: Thinking about a window-packing algorithm... --D6IIOQQv2Iwyp54J Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable > I'm packing child windows into a larger window (MDI fashion). > Imagine a bulletin board covered by a bunch of overlapping items. >=20 > I want to find a "reasonable" way to position the smaller windows. >=20 > Ideally part of each one would be exposed. For real-world values, > that would be impossible, since the total area of the small windows > would far exceed the total area of the large one. Are you familiar with sawfish? It has a 'best-fit' window placement mode similar to what you describe. It is written in rep, a lisp dialect, but hopefully it will be easy enough for you to follow. I put the applicable file at http://kapheine.hypa.net/tmp/smart.jl. If you snag the sawfish distribution (http://sawfish.sourceforge.net) there are a couple other placement modes in lisp/sawfish/wm/placement/: off-center, stagger, and top-left. But I think smart is what you want. -- Zachary P. Landau GPG: gpg --recv-key 0x24E5AD99 | http://kapheine.hypa.net/kapheine.asc --D6IIOQQv2Iwyp54J Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQFAWVjKCwWyMCTlrZkRApXJAJ9+TGCP7pvSleVFDiCiJ9Pb5GbhlQCfRGSw ybPE/TYMTzt9jViAoCNfve8= =AYqh -----END PGP SIGNATURE----- --D6IIOQQv2Iwyp54J--