I have my dock on the right edge of the screen, and my clip right next
to it. So the first icon underneath the clip is 64 pixels from the top
and 64 from the right. It seems silly for it to bounce downwards instead
of sideways like every other icon under the clip.

So make the choice of vertical or horizontal for docked icons be
relative to the dock or clip rather than absolute screen position.
Left/right or up/down is still chosen by screen position, as are
situations where the icon is a chess bishop's move from the clip.
---
 src/superfluous.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/superfluous.c b/src/superfluous.c
index 75652f4..d5aaf50 100644
--- a/src/superfluous.c
+++ b/src/superfluous.c
@@ -355,8 +355,13 @@ static int bounceDirection(WAppIcon *aicon)
                v = b;
        }
 
-       if (h < v) dir &= ~(top_e | bottom_e);
-       else dir &= ~(left_e | right_e);
+       if (aicon->dock && abs(aicon->xindex) != abs(aicon->yindex)) {
+               if (abs(aicon->xindex) < abs(aicon->yindex)) dir &= ~(top_e | 
bottom_e);
+               else dir &= ~(left_e | right_e);
+       } else {
+               if (h < v) dir &= ~(top_e | bottom_e);
+               else dir &= ~(left_e | right_e);
+       }
 
        switch (dir) {
        case left_e:
-- 
1.7.1


-- 
To unsubscribe, send mail to [email protected].

Reply via email to