aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Window.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/Window.cc b/src/Window.cc
index c09cc24..4704672 100644
--- a/src/Window.cc
+++ b/src/Window.cc
@@ -3725,25 +3725,27 @@ FluxboxWindow::ReferenceCorner FluxboxWindow::getCorner(string str) {
3725void FluxboxWindow::translateXCoords(int &x, ReferenceCorner dir) const { 3725void FluxboxWindow::translateXCoords(int &x, ReferenceCorner dir) const {
3726 int head = getOnHead(), bw = 2 * frame().window().borderWidth(), 3726 int head = getOnHead(), bw = 2 * frame().window().borderWidth(),
3727 left = screen().maxLeft(head), right = screen().maxRight(head); 3727 left = screen().maxLeft(head), right = screen().maxRight(head);
3728 int w = width();
3728 3729
3729 if (dir == LEFTTOP || dir == LEFT || dir == LEFTBOTTOM) 3730 if (dir == LEFTTOP || dir == LEFT || dir == LEFTBOTTOM)
3730 x += left; 3731 x += left;
3731 if (dir == RIGHTTOP || dir == RIGHT || dir == RIGHTBOTTOM) 3732 if (dir == RIGHTTOP || dir == RIGHT || dir == RIGHTBOTTOM)
3732 x = right - width() - bw - x; 3733 x = right - w - bw - x;
3733 if (dir == TOP || dir == CENTER || dir == BOTTOM) 3734 if (dir == TOP || dir == CENTER || dir == BOTTOM)
3734 x += (left + right - width() - bw)/2; 3735 x += (left + right - w - bw)/2;
3735} 3736}
3736 3737
3737void FluxboxWindow::translateYCoords(int &y, ReferenceCorner dir) const { 3738void FluxboxWindow::translateYCoords(int &y, ReferenceCorner dir) const {
3738 int head = getOnHead(), bw = 2 * frame().window().borderWidth(), 3739 int head = getOnHead(), bw = 2 * frame().window().borderWidth(),
3739 top = screen().maxTop(head), bottom = screen().maxBottom(head); 3740 top = screen().maxTop(head), bottom = screen().maxBottom(head);
3741 int h = height();
3740 3742
3741 if (dir == LEFTTOP || dir == TOP || dir == RIGHTTOP) 3743 if (dir == LEFTTOP || dir == TOP || dir == RIGHTTOP)
3742 y += top; 3744 y += top;
3743 if (dir == LEFTBOTTOM || dir == BOTTOM || dir == RIGHTBOTTOM) 3745 if (dir == LEFTBOTTOM || dir == BOTTOM || dir == RIGHTBOTTOM)
3744 y = bottom - height() - bw - y; 3746 y = bottom - h - bw - y;
3745 if (dir == LEFT || dir == CENTER || dir == RIGHT) 3747 if (dir == LEFT || dir == CENTER || dir == RIGHT)
3746 y += (top + bottom - height() - bw)/2; 3748 y += (top + bottom - h - bw)/2;
3747} 3749}
3748 3750
3749void FluxboxWindow::translateCoords(int &x, int &y, ReferenceCorner dir) const { 3751void FluxboxWindow::translateCoords(int &x, int &y, ReferenceCorner dir) const {