aboutsummaryrefslogtreecommitdiff
path: root/src/Workspace.cc
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2003-05-15 12:00:46 (GMT)
committerfluxgen <fluxgen>2003-05-15 12:00:46 (GMT)
commit988392b1eb89deaddfddfcb37a15e8f55d58bb70 (patch)
tree493d69abd418722498d1b53982653eae1d4a37e6 /src/Workspace.cc
parentcbce8634dde14fd7000fde92e86f4bd4bf3525c2 (diff)
downloadfluxbox_pavel-988392b1eb89deaddfddfcb37a15e8f55d58bb70.zip
fluxbox_pavel-988392b1eb89deaddfddfcb37a15e8f55d58bb70.tar.bz2
minor cleaning in BScreen interface
Diffstat (limited to 'src/Workspace.cc')
-rw-r--r--src/Workspace.cc44
1 files changed, 22 insertions, 22 deletions
diff --git a/src/Workspace.cc b/src/Workspace.cc
index 0f89986..2b1a504 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.64 2003/05/15 11:17:27 fluxgen Exp $ 25// $Id: Workspace.cc,v 1.65 2003/05/15 12:00:46 fluxgen Exp $
26 26
27#include "Workspace.hh" 27#include "Workspace.hh"
28 28
@@ -115,7 +115,7 @@ Workspace::GroupList Workspace::m_groups;
115Workspace::Workspace(BScreen &scrn, FbTk::MultLayers &layermanager, unsigned int i): 115Workspace::Workspace(BScreen &scrn, FbTk::MultLayers &layermanager, unsigned int i):
116 m_screen(scrn), 116 m_screen(scrn),
117 m_lastfocus(0), 117 m_lastfocus(0),
118 m_clientmenu(*scrn.menuTheme(), scrn.getScreenNumber(), *scrn.getImageControl()), 118 m_clientmenu(*scrn.menuTheme(), scrn.screenNumber(), *scrn.getImageControl()),
119 m_layermanager(layermanager), 119 m_layermanager(layermanager),
120 m_name(""), 120 m_name(""),
121 m_id(i), 121 m_id(i),
@@ -401,7 +401,7 @@ void Workspace::update() {
401 401
402 402
403bool Workspace::isCurrent() const{ 403bool Workspace::isCurrent() const{
404 return (m_id == screen().getCurrentWorkspaceID()); 404 return (m_id == screen().currentWorkspaceID());
405} 405}
406 406
407 407
@@ -440,7 +440,7 @@ void Workspace::setName(const std::string &name) {
440*/ 440*/
441void Workspace::shutdown() { 441void Workspace::shutdown() {
442#ifdef DEBUG 442#ifdef DEBUG
443 cerr<<__FILE__<<"("<<__FUNCTION__<<"): scr "<<screen().getScreenNumber()<<", ws "<< 443 cerr<<__FILE__<<"("<<__FUNCTION__<<"): scr "<<screen().screenNumber()<<", ws "<<
444 m_id<<", windowlist:"<<endl; 444 m_id<<", windowlist:"<<endl;
445 copy(m_windowlist.begin(), m_windowlist.end(), 445 copy(m_windowlist.begin(), m_windowlist.end(),
446 ostream_iterator<FluxboxWindow *>(cerr, " \n")); 446 ostream_iterator<FluxboxWindow *>(cerr, " \n"));
@@ -507,10 +507,10 @@ void Workspace::placeWindow(FluxboxWindow &win) {
507 test_x = root_x - (win_w / 2); 507 test_x = root_x - (win_w / 2);
508 test_y = root_y - (win_h / 2); 508 test_y = root_y - (win_h / 2);
509 509
510 min_x = (int) screen().getMaxLeft(); 510 min_x = (int) screen().maxLeft();
511 min_y = (int) screen().getMaxTop(); 511 min_y = (int) screen().maxTop();
512 max_x = (int) screen().getMaxRight() - win_w; 512 max_x = (int) screen().maxRight() - win_w;
513 max_y = (int) screen().getMaxBottom() - win_h; 513 max_y = (int) screen().maxBottom() - win_h;
514 514
515 // keep the window inside the screen 515 // keep the window inside the screen
516 516
@@ -539,21 +539,21 @@ void Workspace::placeWindow(FluxboxWindow &win) {
539 test_y = 0; 539 test_y = 0;
540 540
541 if (screen().getColPlacementDirection() == BScreen::BOTTOMTOP) 541 if (screen().getColPlacementDirection() == BScreen::BOTTOMTOP)
542 test_y = screen().getHeight() - win_h - test_y; 542 test_y = screen().height() - win_h - test_y;
543 543
544 544
545 while (((screen().getColPlacementDirection() == BScreen::BOTTOMTOP) ? 545 while (((screen().getColPlacementDirection() == BScreen::BOTTOMTOP) ?
546 test_y > 0 : test_y + win_h < (signed) screen().getHeight()) && 546 test_y > 0 : test_y + win_h < (signed) screen().height()) &&
547 ! placed) { 547 ! placed) {
548 548
549 test_x = 0; 549 test_x = 0;
550 550
551 if (screen().getRowPlacementDirection() == BScreen::RIGHTLEFT) 551 if (screen().getRowPlacementDirection() == BScreen::RIGHTLEFT)
552 test_x = screen().getWidth() - win_w - test_x; 552 test_x = screen().width() - win_w - test_x;
553 553
554 554
555 while (((screen().getRowPlacementDirection() == BScreen::RIGHTLEFT) ? 555 while (((screen().getRowPlacementDirection() == BScreen::RIGHTLEFT) ?
556 test_x > 0 : test_x + win_w < (signed) screen().getWidth()) && ! placed) { 556 test_x > 0 : test_x + win_w < (signed) screen().width()) && ! placed) {
557 557
558 placed = true; 558 placed = true;
559 559
@@ -599,19 +599,19 @@ void Workspace::placeWindow(FluxboxWindow &win) {
599 599
600 if (screen().getRowPlacementDirection() == BScreen::RIGHTLEFT) 600 if (screen().getRowPlacementDirection() == BScreen::RIGHTLEFT)
601 601
602 test_x = screen().getWidth() - win_w - test_x; 602 test_x = screen().width() - win_w - test_x;
603 603
604 604
605 while (((screen().getRowPlacementDirection() == BScreen::RIGHTLEFT) ? 605 while (((screen().getRowPlacementDirection() == BScreen::RIGHTLEFT) ?
606 test_x > 0 : test_x + win_w < (signed) screen().getWidth()) && 606 test_x > 0 : test_x + win_w < (signed) screen().width()) &&
607 !placed) { 607 !placed) {
608 608
609 test_y = 0; 609 test_y = 0;
610 if (screen().getColPlacementDirection() == BScreen::BOTTOMTOP) 610 if (screen().getColPlacementDirection() == BScreen::BOTTOMTOP)
611 test_y = screen().getHeight() - win_h - test_y; 611 test_y = screen().height() - win_h - test_y;
612 612
613 while (((screen().getColPlacementDirection() == BScreen::BOTTOMTOP) ? 613 while (((screen().getColPlacementDirection() == BScreen::BOTTOMTOP) ?
614 test_y > 0 : test_y + win_h < (signed) screen().getHeight()) && 614 test_y > 0 : test_y + win_h < (signed) screen().height()) &&
615 !placed) { 615 !placed) {
616 placed = True; 616 placed = True;
617 617
@@ -656,8 +656,8 @@ void Workspace::placeWindow(FluxboxWindow &win) {
656 // cascade placement or smart placement failed 656 // cascade placement or smart placement failed
657 if (! placed) { 657 if (! placed) {
658 658
659 if (((unsigned) m_cascade_x > (screen().getWidth() / 2)) || 659 if (((unsigned) m_cascade_x > (screen().width() / 2)) ||
660 ((unsigned) m_cascade_y > (screen().getHeight() / 2))) 660 ((unsigned) m_cascade_y > (screen().height() / 2)))
661 m_cascade_x = m_cascade_y = 32; 661 m_cascade_x = m_cascade_y = 32;
662 662
663 place_x = m_cascade_x; 663 place_x = m_cascade_x;
@@ -667,10 +667,10 @@ void Workspace::placeWindow(FluxboxWindow &win) {
667 m_cascade_y += win.titleHeight(); 667 m_cascade_y += win.titleHeight();
668 } 668 }
669 669
670 if (place_x + win_w > (signed) screen().getWidth()) 670 if (place_x + win_w > (signed) screen().width())
671 place_x = (((signed) screen().getWidth()) - win_w) / 2; 671 place_x = (((signed) screen().width()) - win_w) / 2;
672 if (place_y + win_h > (signed) screen().getHeight()) 672 if (place_y + win_h > (signed) screen().height())
673 place_y = (((signed) screen().getHeight()) - win_h) / 2; 673 place_y = (((signed) screen().height()) - win_h) / 2;
674 674
675 675
676 win.moveResize(place_x, place_y, win.width(), win.height()); 676 win.moveResize(place_x, place_y, win.width(), win.height());