Ah, this looks like a much better algorithm than the one I ported to epistrophy a while back (the patch is dated April 2). That algorithm came from sawfish. I will definitely have to gank this code for future porting to any WM I happen to be using. :) -- michael