diff options
author | fluxgen <fluxgen> | 2003-04-25 11:22:40 (GMT) |
---|---|---|
committer | fluxgen <fluxgen> | 2003-04-25 11:22:40 (GMT) |
commit | 169e45c49b0cbeb8a904a0493adc758cfad66ab2 (patch) | |
tree | b70a0710f21055b628a64b0682ad55412be5bcf4 /src/Workspace.cc | |
parent | ccf0afe07e647e41debfcf62acadb29d0bbef11e (diff) | |
download | fluxbox-169e45c49b0cbeb8a904a0493adc758cfad66ab2.zip fluxbox-169e45c49b0cbeb8a904a0493adc758cfad66ab2.tar.bz2 |
fixed border width stuff
Diffstat (limited to 'src/Workspace.cc')
-rw-r--r-- | src/Workspace.cc | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/src/Workspace.cc b/src/Workspace.cc index 4d357b0..9799034 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.54 2003/04/25 09:07:13 rathnor Exp $ | 25 | // $Id: Workspace.cc,v 1.55 2003/04/25 11:22:40 fluxgen Exp $ |
26 | 26 | ||
27 | #include "Workspace.hh" | 27 | #include "Workspace.hh" |
28 | 28 | ||
@@ -528,8 +528,9 @@ void Workspace::placeWindow(FluxboxWindow &win) { | |||
528 | if (screen.getRowPlacementDirection() == BScreen::RIGHTLEFT) | 528 | if (screen.getRowPlacementDirection() == BScreen::RIGHTLEFT) |
529 | change_x = -1; | 529 | change_x = -1; |
530 | 530 | ||
531 | int win_w = win.getWidth() + screen.getBorderWidth2x(), | 531 | int win_w = win.getWidth() + win.getFbWindow().borderWidth()*2, |
532 | win_h = win.getHeight() + screen.getBorderWidth2x(); | 532 | win_h = win.getHeight() + win.getFbWindow().borderWidth()*2; |
533 | |||
533 | 534 | ||
534 | int test_x, test_y, curr_x, curr_y, curr_w, curr_h; | 535 | int test_x, test_y, curr_x, curr_y, curr_w, curr_h; |
535 | 536 | ||
@@ -541,9 +542,10 @@ void Workspace::placeWindow(FluxboxWindow &win) { | |||
541 | 542 | ||
542 | Window ignore_w; | 543 | Window ignore_w; |
543 | 544 | ||
544 | XQueryPointer(screen.getBaseDisplay()->getXDisplay(), | 545 | XQueryPointer(FbTk::App::instance()->display(), |
545 | screen.getRootWindow(), &ignore_w, &ignore_w, &root_x, &root_y, | 546 | screen.getRootWindow(), &ignore_w, |
546 | &ignore_i, &ignore_i, &ignore_ui); | 547 | &ignore_w, &root_x, &root_y, |
548 | &ignore_i, &ignore_i, &ignore_ui); | ||
547 | 549 | ||
548 | test_x = root_x - (win_w / 2); | 550 | test_x = root_x - (win_w / 2); |
549 | test_y = root_y - (win_h / 2); | 551 | test_y = root_y - (win_h / 2); |
@@ -606,9 +608,9 @@ void Workspace::placeWindow(FluxboxWindow &win) { | |||
606 | 608 | ||
607 | curr_x = window.getXFrame(); | 609 | curr_x = window.getXFrame(); |
608 | curr_y = window.getYFrame(); | 610 | curr_y = window.getYFrame(); |
609 | curr_w = window.getWidth() + screen.getBorderWidth2x(); | 611 | curr_w = window.getWidth() + window.getFbWindow().borderWidth()*2; |
610 | curr_h = window.isShaded() ? window.getTitleHeight() : | 612 | curr_h = window.isShaded() ? window.getTitleHeight() : |
611 | window.getHeight() + screen.getBorderWidth2x(); | 613 | window.getHeight() + window.getFbWindow().borderWidth()*2; |
612 | 614 | ||
613 | if (curr_x < test_x + win_w && | 615 | if (curr_x < test_x + win_w && |
614 | curr_x + curr_w > test_x && | 616 | curr_x + curr_w > test_x && |
@@ -661,12 +663,12 @@ void Workspace::placeWindow(FluxboxWindow &win) { | |||
661 | for (; it != it_end && placed; ++it) { | 663 | for (; it != it_end && placed; ++it) { |
662 | curr_x = (*it)->getXFrame(); | 664 | curr_x = (*it)->getXFrame(); |
663 | curr_y = (*it)->getYFrame(); | 665 | curr_y = (*it)->getYFrame(); |
664 | curr_w = (*it)->getWidth() + screen.getBorderWidth2x(); | 666 | curr_w = (*it)->getWidth() + (*it)->getFbWindow().borderWidth()*2; |
665 | curr_h = | 667 | curr_h = |
666 | (((*it)->isShaded()) | 668 | (((*it)->isShaded()) |
667 | ? (*it)->getTitleHeight() | 669 | ? (*it)->getTitleHeight() |
668 | : (*it)->getHeight()) + | 670 | : (*it)->getHeight()) + |
669 | screen.getBorderWidth2x();; | 671 | (*it)->getFbWindow().borderWidth()*2; |
670 | 672 | ||
671 | 673 | ||
672 | if (curr_x < test_x + win_w && | 674 | if (curr_x < test_x + win_w && |