aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Ganzhorn <peter.ganzhorn@gmail.com>2015-05-03 16:18:40 (GMT)
committerMathias Gumz <akira@fluxbox.org>2015-05-14 12:50:34 (GMT)
commit69d13337fe7c54ef26e02ca285246ccdfe03c319 (patch)
tree14b14bce35c1c97cb91410eaecc2b41ce58125da
parent169d64061083f834878b3a178c6ebfd08c0afcc0 (diff)
downloadfluxbox-69d13337fe7c54ef26e02ca285246ccdfe03c319.zip
fluxbox-69d13337fe7c54ef26e02ca285246ccdfe03c319.tar.bz2
Fix hidden toolbar placement
-rw-r--r--src/Toolbar.cc14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/Toolbar.cc b/src/Toolbar.cc
index 4f8804f..b607f21 100644
--- a/src/Toolbar.cc
+++ b/src/Toolbar.cc
@@ -648,24 +648,29 @@ void Toolbar::setPlacement(Toolbar::Placement where) {
648 break; 648 break;
649 case TOPCENTER: 649 case TOPCENTER:
650 frame.x += (head_w - static_cast<int>(frame.width))/2 - bw; 650 frame.x += (head_w - static_cast<int>(frame.width))/2 - bw;
651 frame.x_hidden = frame.x;
651 frame.y_hidden += pixel - bw - static_cast<int>(frame.height); 652 frame.y_hidden += pixel - bw - static_cast<int>(frame.height);
652 break; 653 break;
653 case TOPRIGHT: 654 case TOPRIGHT:
654 frame.x += head_w - static_cast<int>(frame.width) - bw*2; 655 frame.x += head_w - static_cast<int>(frame.width) - bw*2;
656 frame.x_hidden = frame.x;
655 frame.y_hidden += pixel - bw - static_cast<int>(frame.height); 657 frame.y_hidden += pixel - bw - static_cast<int>(frame.height);
656 break; 658 break;
657 case BOTTOMRIGHT: 659 case BOTTOMRIGHT:
658 frame.x += head_w - static_cast<int>(frame.width) - bw*2; 660 frame.x += head_w - static_cast<int>(frame.width) - bw*2;
659 frame.y += head_h - static_cast<int>(frame.height) - bw*2; 661 frame.y += head_h - static_cast<int>(frame.height) - bw*2;
662 frame.x_hidden = frame.x;
660 frame.y_hidden += head_h - bw - pixel; 663 frame.y_hidden += head_h - bw - pixel;
661 break; 664 break;
662 case BOTTOMCENTER: // default is BOTTOMCENTER 665 case BOTTOMCENTER: // default is BOTTOMCENTER
663 frame.x += (head_w - static_cast<int>(frame.width))/2 - bw; 666 frame.x += (head_w - static_cast<int>(frame.width))/2 - bw;
664 frame.y += head_h - static_cast<int>(frame.height) - bw*2; 667 frame.y += head_h - static_cast<int>(frame.height) - bw*2;
668 frame.x_hidden = frame.x;
665 frame.y_hidden += head_h - bw - pixel; 669 frame.y_hidden += head_h - bw - pixel;
666 break; 670 break;
667 case LEFTCENTER: 671 case LEFTCENTER:
668 frame.y += (head_h - static_cast<int>(frame.height))/2 - bw; 672 frame.y += (head_h - static_cast<int>(frame.height))/2 - bw;
673 frame.y_hidden = frame.y;
669 frame.x_hidden += pixel - static_cast<int>(frame.width) - bw; 674 frame.x_hidden += pixel - static_cast<int>(frame.width) - bw;
670 break; 675 break;
671 case LEFTTOP: 676 case LEFTTOP:
@@ -673,21 +678,24 @@ void Toolbar::setPlacement(Toolbar::Placement where) {
673 break; 678 break;
674 case LEFTBOTTOM: 679 case LEFTBOTTOM:
675 frame.y = head_h - static_cast<int>(frame.height) - bw*2; 680 frame.y = head_h - static_cast<int>(frame.height) - bw*2;
681 frame.y_hidden = frame.y;
676 frame.x_hidden += pixel - static_cast<int>(frame.width) - bw; 682 frame.x_hidden += pixel - static_cast<int>(frame.width) - bw;
677 break; 683 break;
678 case RIGHTCENTER: 684 case RIGHTCENTER:
679 frame.x += head_w - static_cast<int>(frame.width) - bw*2; 685 frame.x += head_w - static_cast<int>(frame.width) - bw*2;
680 frame.y += (head_h - static_cast<int>(frame.height))/2 - bw; 686 frame.y += (head_h - static_cast<int>(frame.height))/2 - bw;
681 frame.x_hidden += static_cast<int>(frame.width) + bw - pixel; 687 frame.x_hidden += head_w - bw - pixel;
688 frame.y_hidden = frame.y;
682 break; 689 break;
683 case RIGHTTOP: 690 case RIGHTTOP:
684 frame.x += head_w - static_cast<int>(frame.width) - bw*2; 691 frame.x += head_w - static_cast<int>(frame.width) - bw*2;
685 frame.x_hidden += static_cast<int>(frame.width) + bw - pixel; 692 frame.x_hidden += head_w - bw - pixel;
686 break; 693 break;
687 case RIGHTBOTTOM: 694 case RIGHTBOTTOM:
688 frame.x += head_w - static_cast<int>(frame.width) - bw*2; 695 frame.x += head_w - static_cast<int>(frame.width) - bw*2;
689 frame.y += head_h - static_cast<int>(frame.height) - bw*2; 696 frame.y += head_h - static_cast<int>(frame.height) - bw*2;
690 frame.x_hidden += static_cast<int>(frame.width) + bw - pixel; 697 frame.x_hidden += head_w - bw - pixel;
698 frame.y_hidden = frame.y;
691 break; 699 break;
692 } 700 }
693 701