diff options
author | rathnor <rathnor> | 2004-03-15 23:36:13 (GMT) |
---|---|---|
committer | rathnor <rathnor> | 2004-03-15 23:36:13 (GMT) |
commit | ca9f4848835e22a4bd19ac78c6b8ace84e393ca5 (patch) | |
tree | f1f5d60f04f62fed6b92e70c2414db7b2c716734 /src | |
parent | 1d58e3afb289dd33ddb1b22533f4d717339ec216 (diff) | |
download | fluxbox-ca9f4848835e22a4bd19ac78c6b8ace84e393ca5.zip fluxbox-ca9f4848835e22a4bd19ac78c6b8ace84e393ca5.tar.bz2 |
really fix placeWindow
Diffstat (limited to 'src')
-rw-r--r-- | src/Workspace.cc | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/src/Workspace.cc b/src/Workspace.cc index af57d76..33818ad 100644 --- a/src/Workspace.cc +++ b/src/Workspace.cc | |||
@@ -22,7 +22,7 @@ | |||
22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
23 | // DEALINGS IN THE SOFTWARE. | 23 | // DEALINGS IN THE SOFTWARE. |
24 | 24 | ||
25 | // $Id: Workspace.cc,v 1.93 2004/03/15 03:48:47 rathnor Exp $ | 25 | // $Id: Workspace.cc,v 1.94 2004/03/15 23:36:13 rathnor Exp $ |
26 | 26 | ||
27 | #include "Workspace.hh" | 27 | #include "Workspace.hh" |
28 | 28 | ||
@@ -489,22 +489,25 @@ void Workspace::placeWindow(FluxboxWindow &win) { | |||
489 | test_y = head_bot - win_h; | 489 | test_y = head_bot - win_h; |
490 | 490 | ||
491 | while (!placed && | 491 | while (!placed && |
492 | (top_bot ? test_y + win_h < head_bot | 492 | (top_bot ? test_y + win_h <= head_bot |
493 | : test_y > head_top)) { | 493 | : test_y >= head_top)) { |
494 | 494 | ||
495 | if (left_right) | 495 | if (left_right) |
496 | test_x = head_left; | 496 | test_x = head_left; |
497 | else | 497 | else |
498 | test_x = head_right - win_w; | 498 | test_x = head_right - win_w; |
499 | 499 | ||
500 | // The trick here is that we set it to the furthest away one, | ||
501 | // then the code brings it back down to the safest one that | ||
502 | // we can go to (i.e. the next untested area) | ||
500 | if (top_bot) | 503 | if (top_bot) |
501 | next_y = head_top; | 504 | next_y = head_bot; // will be shrunk |
502 | else | 505 | else |
503 | next_y = head_bot - win_h; // will be shrunk | 506 | next_y = head_top-1; |
504 | 507 | ||
505 | while (!placed && | 508 | while (!placed && |
506 | (left_right ? test_x + win_w < head_right | 509 | (left_right ? test_x + win_w <= head_right |
507 | : test_x > head_left)) { | 510 | : test_x >= head_left)) { |
508 | 511 | ||
509 | placed = true; | 512 | placed = true; |
510 | 513 | ||
@@ -578,13 +581,13 @@ void Workspace::placeWindow(FluxboxWindow &win) { | |||
578 | test_x = head_right - win_w; | 581 | test_x = head_right - win_w; |
579 | 582 | ||
580 | while (!placed && | 583 | while (!placed && |
581 | (left_right ? test_x + win_w < head_right | 584 | (left_right ? test_x + win_w <= head_right |
582 | : test_x > head_left)) { | 585 | : test_x >= head_left)) { |
583 | 586 | ||
584 | if (left_right) | 587 | if (left_right) |
585 | next_x = head_right; // it will get shrunk | 588 | next_x = head_right; // it will get shrunk |
586 | else | 589 | else |
587 | next_x = head_left; | 590 | next_x = head_left-1; |
588 | 591 | ||
589 | if (top_bot) | 592 | if (top_bot) |
590 | test_y = head_top; | 593 | test_y = head_top; |
@@ -592,8 +595,8 @@ void Workspace::placeWindow(FluxboxWindow &win) { | |||
592 | test_y = head_bot - win_h; | 595 | test_y = head_bot - win_h; |
593 | 596 | ||
594 | while (!placed && | 597 | while (!placed && |
595 | (top_bot ? test_y + win_h < head_bot | 598 | (top_bot ? test_y + win_h <= head_bot |
596 | : test_y > head_top)) { | 599 | : test_y >= head_top)) { |
597 | placed = True; | 600 | placed = True; |
598 | 601 | ||
599 | next_y = test_y + change_y; | 602 | next_y = test_y + change_y; |