1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-23 06:38:05 +01:00

Fix bounce direction of docked appicons

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.
This commit is contained in:
Brad Jorsch
2010-09-15 22:13:26 -04:00
committed by Carlos R. Mafra
parent ee69b6207a
commit 1194889c95

View File

@@ -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: