awful.placement.no_overlap: Honor original position
commitb2e2959be815401bba2f59aa3b027300b863b8f7
authorUli Schlachter <psychon@znc.in>
Tue, 1 Mar 2011 16:52:00 +0000 (1 17:52 +0100)
committerUli Schlachter <psychon@znc.in>
Tue, 1 Mar 2011 16:55:56 +0000 (1 17:55 +0100)
tree283af549e5d28a2e510b5e6c3b278bc3121198c6
parentd2b684d4a3e11bd3b00b6a0a4abd5698419dadb0
awful.placement.no_overlap: Honor original position

awful.placement.no_overlap caused clients on an otherwise empty desktop to stich
to the top-left corner of the screen because it always preferred the top-left
corner of the available space.

This commit doesn't change the way in which the available area is computed, but
instead this now tries to keep the client at its original position if that is
available.

This fixes cases where calling awful.placement.no_overlap as a callback from an
awful.rule rule didn't work because the manage signal in the default config
later overrode that via calling awful.placement.no_overlap.

Signed-off-by: Uli Schlachter <psychon@znc.in>
lib/awful/placement.lua.in