diff options
| author | Dana Jansens <danakj@orodu.net> | 2003-08-12 19:25:03 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2003-08-12 19:25:03 +0000 |
| commit | e531f6900672fc278481b7ebf664fe2221517909 (patch) | |
| tree | 7faedf41123209be1dea88c74eb92e1bb59aebf2 /openbox/action.c | |
| parent | 1045079482453424f8320de99639390e3020eb72 (diff) | |
bug fixes for growtoedge from tore. props to tore for all the growtoedge and movetoedge code, and directional focus code also since i dont think i mentioned his name before in the changelogs woot.
Diffstat (limited to 'openbox/action.c')
| -rw-r--r-- | openbox/action.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/openbox/action.c b/openbox/action.c index 0ab8fe7b..9c2ded30 100644 --- a/openbox/action.c +++ b/openbox/action.c @@ -1262,7 +1262,7 @@ void action_growtoedge(union ActionData *data) switch(data->diraction.direction) { case OB_DIRECTION_NORTH: dest = client_directional_edge_search(c, OB_DIRECTION_NORTH); - if(a->y > (y - c->size_inc.height)) + if (a->y == y) height = c->frame->area.height / 2; else { height = c->frame->area.y + c->frame->area.height - dest; @@ -1271,7 +1271,7 @@ void action_growtoedge(union ActionData *data) break; case OB_DIRECTION_WEST: dest = client_directional_edge_search(c, OB_DIRECTION_WEST); - if(a->x > (x - c->size_inc.width)) + if (a->x == x) width = c->frame->area.width / 2; else { width = c->frame->area.x + c->frame->area.width - dest; @@ -1280,21 +1280,23 @@ void action_growtoedge(union ActionData *data) break; case OB_DIRECTION_SOUTH: dest = client_directional_edge_search(c, OB_DIRECTION_SOUTH); - if(a->y + a->height < - (y + c->frame->area.height + c->size_inc.height)) { + if (a->y + a->height == y + c->frame->area.height) { height = c->frame->area.height / 2; y = a->y + a->height - height; } else height = dest - c->frame->area.y; + y += (height - c->frame->area.height) % c->size_inc.height; + height -= (height - c->frame->area.height) % c->size_inc.height; break; case OB_DIRECTION_EAST: dest = client_directional_edge_search(c, OB_DIRECTION_EAST); - if(a->x + a->width < - (x + c->frame->area.width + c->size_inc.width)) { + if (a->x + a->width == x + c->frame->area.width) { width = c->frame->area.width / 2; x = a->x + a->width - width; } else width = dest - c->frame->area.x; + x += (width - c->frame->area.width) % c->size_inc.width; + width -= (width - c->frame->area.width) % c->size_inc.width; break; default: g_assert_not_reached(); |
