bestfit placement now honors the left->right and top->bottom options for window placement. fix for the placement config menu.
Dana Jansens danakj@orodu.net
2 files changed,
12 insertions(+),
7 deletions(-)
M
src/Workspace.cc
→
src/Workspace.cc
@@ -396,9 +396,14 @@ (siter->h() >= win_size.h()))
best = siter; } - if (best != NULL) - return new Point(best->origin()); - else + if (best != NULL) { + Point *pt = new Point(best->origin()); + if (screen.colPlacementDirection() != BScreen::TopBottom) + pt->setY(pt->y() + (best->h() - win_size.h())); + if (screen.rowPlacementDirection() != BScreen::LeftRight) + pt->setX(pt->x() + (best->w() - win_size.w())); + return pt; + } else return NULL; //fall back to cascade }