diff options
| author | Dana Jansens <danakj@orodu.net> | 2002-04-21 02:02:27 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2002-04-21 02:02:27 +0000 |
| commit | 32951060f693424bd173888e16382a02949c450e (patch) | |
| tree | 9d510b2f2fc6a373c1742ea65b80286dc004f121 /src/Workspace.cc | |
| parent | ec028e395f5b88611759c88d1af39bcd708c2910 (diff) | |
bestfit placement now honors the left->right and top->bottom options for window placement.
fix for the placement config menu.
Diffstat (limited to 'src/Workspace.cc')
| -rw-r--r-- | src/Workspace.cc | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/Workspace.cc b/src/Workspace.cc index 5f8817cb..70b043c0 100644 --- a/src/Workspace.cc +++ b/src/Workspace.cc @@ -396,9 +396,14 @@ Point *Workspace::bestFitPlacement(const Size &win_size, const Rect &space) 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 } |
