aboutsummaryrefslogtreecommitdiff
path: root/src/Container.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/Container.cc')
-rw-r--r--src/Container.cc14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/Container.cc b/src/Container.cc
index 0bec346..1a7ea34 100644
--- a/src/Container.cc
+++ b/src/Container.cc
@@ -409,10 +409,13 @@ void Container::repositionItems() {
409 // calling Container::resize here risks infinite loops 409 // calling Container::resize here risks infinite loops
410 unsigned int neww = total_width, newh = height; 410 unsigned int neww = total_width, newh = height;
411 translateSize(m_orientation, neww, newh); 411 translateSize(m_orientation, neww, newh);
412 if (align == RIGHT || m_orientation == FbTk::ROT270) { 412 if (align == RIGHT && m_orientation != FbTk::ROT270 || align == LEFT && m_orientation == FbTk::ROT270) {
413 int deltax = - (total_width - cur_width); 413 int deltax = 0;
414 int deltay = 0; 414 int deltay = 0;
415 FbTk::translateCoords(m_orientation, deltax, deltay, total_width, height); 415 if (m_orientation == FbTk::ROT0 || m_orientation == FbTk::ROT180)
416 deltax = - (total_width - cur_width);
417 else
418 deltay = - (total_width - cur_width);
416 419
417 FbTk::FbWindow::moveResize(x() + deltax, y() + deltay, neww, newh); 420 FbTk::FbWindow::moveResize(x() + deltax, y() + deltay, neww, newh);
418 } else { 421 } else {
@@ -435,6 +438,11 @@ void Container::repositionItems() {
435 next_x = total_width - max_width_per_client - borderW; 438 next_x = total_width - max_width_per_client - borderW;
436 } 439 }
437 440
441 // when rot270, our borderwidth adjustment actually needs to be at the
442 // other end (i.e. top), so this puts it there
443 if (m_orientation == FbTk::ROT270)
444 next_x += 2*borderW;
445
438 int tmpx, tmpy; 446 int tmpx, tmpy;
439 unsigned int tmpw, tmph; 447 unsigned int tmpw, tmph;
440 for (; it != it_end; ++it, next_x += direction*(max_width_per_client + borderW + extra)) { 448 for (; it != it_end; ++it, next_x += direction*(max_width_per_client + borderW + extra)) {