mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-23 14:42:29 +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:
committed by
Carlos R. Mafra
parent
ee69b6207a
commit
1194889c95
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user