aboutsummaryrefslogtreecommitdiff
path: root/src/ColSmartPlacement.cc
diff options
context:
space:
mode:
authorsimonb <simonb>2006-03-20 11:31:24 (GMT)
committersimonb <simonb>2006-03-20 11:31:24 (GMT)
commitf2d3fff4d4db7677814379139dcec3e31fc68047 (patch)
tree95bd9dc99986104613acc37945895b0812e63801 /src/ColSmartPlacement.cc
parenteba0040373179cc6d34f8ee132209f2fa01c2889 (diff)
downloadfluxbox-f2d3fff4d4db7677814379139dcec3e31fc68047.zip
fluxbox-f2d3fff4d4db7677814379139dcec3e31fc68047.tar.bz2
external tabs
Diffstat (limited to 'src/ColSmartPlacement.cc')
-rw-r--r--src/ColSmartPlacement.cc19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/ColSmartPlacement.cc b/src/ColSmartPlacement.cc
index abb74d7..5b84168 100644
--- a/src/ColSmartPlacement.cc
+++ b/src/ColSmartPlacement.cc
@@ -48,8 +48,11 @@ bool ColSmartPlacement::placeWindow(const std::vector<FluxboxWindow *> &windowli
48 48
49 int test_x; 49 int test_x;
50 50
51 int win_w = win.width() + win.fbWindow().borderWidth()*2; 51 int win_w = win.width() + win.fbWindow().borderWidth()*2 + win.widthOffset();
52 int win_h = win.height() + win.fbWindow().borderWidth()*2; 52 int win_h = win.height() + win.fbWindow().borderWidth()*2 + win.heightOffset();
53
54 int x_off = win.xOffset();
55 int y_off = win.yOffset();
53 56
54 if (left_right) 57 if (left_right)
55 test_x = head_left; 58 test_x = head_left;
@@ -87,10 +90,10 @@ bool ColSmartPlacement::placeWindow(const std::vector<FluxboxWindow *> &windowli
87 std::vector<FluxboxWindow *>::const_iterator it_end = 90 std::vector<FluxboxWindow *>::const_iterator it_end =
88 windowlist.end(); 91 windowlist.end();
89 for (; it != it_end && placed; ++it) { 92 for (; it != it_end && placed; ++it) {
90 int curr_x = (*it)->x(); 93 int curr_x = (*it)->x() + (*it)->xOffset();
91 int curr_y = (*it)->y(); 94 int curr_y = (*it)->y() + (*it)->yOffset();
92 int curr_w = (*it)->width() + (*it)->fbWindow().borderWidth()*2; 95 int curr_w = (*it)->width() + (*it)->fbWindow().borderWidth()*2 + (*it)->widthOffset();
93 int curr_h = (*it)->height() + (*it)->fbWindow().borderWidth()*2; 96 int curr_h = (*it)->height() + (*it)->fbWindow().borderWidth()*2 + (*it)->heightOffset();
94 97
95 if (curr_x < test_x + win_w && 98 if (curr_x < test_x + win_w &&
96 curr_x + curr_w > test_x && 99 curr_x + curr_w > test_x &&
@@ -122,8 +125,8 @@ bool ColSmartPlacement::placeWindow(const std::vector<FluxboxWindow *> &windowli
122 } 125 }
123 126
124 if (placed) { 127 if (placed) {
125 place_x = test_x; 128 place_x = test_x + x_off;
126 place_y = test_y; 129 place_y = test_y + y_off;
127 } 130 }
128 131
129 test_y = next_y; 132 test_y = next_y;