diff options
Diffstat (limited to 'src/Slit.cc')
-rw-r--r-- | src/Slit.cc | 31 |
1 files changed, 14 insertions, 17 deletions
diff --git a/src/Slit.cc b/src/Slit.cc index 5bb96c4..bcc2051 100644 --- a/src/Slit.cc +++ b/src/Slit.cc | |||
@@ -215,7 +215,7 @@ private: | |||
215 | Slit::Placement m_place; | 215 | Slit::Placement m_place; |
216 | }; | 216 | }; |
217 | 217 | ||
218 | }; // End anonymous namespace | 218 | } // End anonymous namespace |
219 | 219 | ||
220 | unsigned int Slit::s_eventmask = SubstructureRedirectMask | ButtonPressMask | | 220 | unsigned int Slit::s_eventmask = SubstructureRedirectMask | ButtonPressMask | |
221 | EnterWindowMask | LeaveWindowMask | ExposureMask; | 221 | EnterWindowMask | LeaveWindowMask | ExposureMask; |
@@ -766,30 +766,27 @@ void Slit::reposition() { | |||
766 | } | 766 | } |
767 | 767 | ||
768 | int border_width = theme()->borderWidth(); | 768 | int border_width = theme()->borderWidth(); |
769 | int bevel_width = theme()->bevelWidth(); | 769 | int pixel = (border_width == 0 ? 1 : 0); |
770 | // make sure at leaste one pixel is visible | ||
771 | if (border_width >= bevel_width) | ||
772 | bevel_width = border_width + 1; | ||
773 | // place the slit in the appropriate place | 770 | // place the slit in the appropriate place |
774 | switch (placement()) { | 771 | switch (placement()) { |
775 | case TOPLEFT: | 772 | case TOPLEFT: |
776 | frame.x = head_x; | 773 | frame.x = head_x; |
777 | frame.y = head_y; | 774 | frame.y = head_y; |
778 | frame.x_hidden = head_x; | 775 | frame.x_hidden = head_x; |
779 | frame.y_hidden = bevel_width - border_width - frame.height; | 776 | frame.y_hidden = head_y + pixel - border_width - frame.height; |
780 | break; | 777 | break; |
781 | 778 | ||
782 | case LEFTTOP: | 779 | case LEFTTOP: |
783 | frame.x = head_x; | 780 | frame.x = head_x; |
784 | frame.y = head_y; | 781 | frame.y = head_y; |
785 | frame.x_hidden = bevel_width - border_width - frame.width; | 782 | frame.x_hidden = head_x + pixel - border_width - frame.width; |
786 | frame.y_hidden = head_y; | 783 | frame.y_hidden = head_y; |
787 | break; | 784 | break; |
788 | 785 | ||
789 | case LEFTCENTER: | 786 | case LEFTCENTER: |
790 | frame.x = head_x; | 787 | frame.x = head_x; |
791 | frame.y = head_y + (head_h - frame.height) / 2; | 788 | frame.y = head_y + (head_h - frame.height) / 2; |
792 | frame.x_hidden = head_x + bevel_width - border_width - frame.width; | 789 | frame.x_hidden = head_x + pixel - border_width - frame.width; |
793 | frame.y_hidden = frame.y; | 790 | frame.y_hidden = frame.y; |
794 | break; | 791 | break; |
795 | 792 | ||
@@ -797,13 +794,13 @@ void Slit::reposition() { | |||
797 | frame.x = head_x; | 794 | frame.x = head_x; |
798 | frame.y = head_y + head_h - frame.height - border_width*2; | 795 | frame.y = head_y + head_h - frame.height - border_width*2; |
799 | frame.x_hidden = head_x; | 796 | frame.x_hidden = head_x; |
800 | frame.y_hidden = head_y + head_h - bevel_width - border_width; | 797 | frame.y_hidden = head_y + head_h - pixel - border_width; |
801 | break; | 798 | break; |
802 | 799 | ||
803 | case LEFTBOTTOM: | 800 | case LEFTBOTTOM: |
804 | frame.x = head_x; | 801 | frame.x = head_x; |
805 | frame.y = head_y + head_h - frame.height - border_width*2; | 802 | frame.y = head_y + head_h - frame.height - border_width*2; |
806 | frame.x_hidden = head_x + bevel_width - border_width - frame.width; | 803 | frame.x_hidden = head_x + pixel - border_width - frame.width; |
807 | frame.y_hidden = frame.y; | 804 | frame.y_hidden = frame.y; |
808 | break; | 805 | break; |
809 | 806 | ||
@@ -811,34 +808,34 @@ void Slit::reposition() { | |||
811 | frame.x = head_x + ((head_w - frame.width) / 2); | 808 | frame.x = head_x + ((head_w - frame.width) / 2); |
812 | frame.y = head_y; | 809 | frame.y = head_y; |
813 | frame.x_hidden = frame.x; | 810 | frame.x_hidden = frame.x; |
814 | frame.y_hidden = head_y + bevel_width - border_width - frame.height; | 811 | frame.y_hidden = head_y + pixel - border_width - frame.height; |
815 | break; | 812 | break; |
816 | 813 | ||
817 | case BOTTOMCENTER: | 814 | case BOTTOMCENTER: |
818 | frame.x = head_x + ((head_w - frame.width) / 2); | 815 | frame.x = head_x + ((head_w - frame.width) / 2); |
819 | frame.y = head_y + head_h - frame.height - border_width*2; | 816 | frame.y = head_y + head_h - frame.height - border_width*2; |
820 | frame.x_hidden = frame.x; | 817 | frame.x_hidden = frame.x; |
821 | frame.y_hidden = head_y + head_h - bevel_width - border_width; | 818 | frame.y_hidden = head_y + head_h - pixel - border_width; |
822 | break; | 819 | break; |
823 | 820 | ||
824 | case TOPRIGHT: | 821 | case TOPRIGHT: |
825 | frame.x = head_x + head_w - frame.width - border_width*2; | 822 | frame.x = head_x + head_w - frame.width - border_width*2; |
826 | frame.y = head_y; | 823 | frame.y = head_y; |
827 | frame.x_hidden = frame.x; | 824 | frame.x_hidden = frame.x; |
828 | frame.y_hidden = head_y + bevel_width - border_width - frame.height; | 825 | frame.y_hidden = head_y + pixel - border_width - frame.height; |
829 | break; | 826 | break; |
830 | 827 | ||
831 | case RIGHTTOP: | 828 | case RIGHTTOP: |
832 | frame.x = head_x + head_w - frame.width - border_width*2; | 829 | frame.x = head_x + head_w - frame.width - border_width*2; |
833 | frame.y = head_y; | 830 | frame.y = head_y; |
834 | frame.x_hidden = head_x + head_w - bevel_width - border_width; | 831 | frame.x_hidden = head_x + head_w - pixel - border_width; |
835 | frame.y_hidden = head_y; | 832 | frame.y_hidden = head_y; |
836 | break; | 833 | break; |
837 | 834 | ||
838 | case RIGHTCENTER: | 835 | case RIGHTCENTER: |
839 | frame.x = head_x + head_w - frame.width - border_width*2; | 836 | frame.x = head_x + head_w - frame.width - border_width*2; |
840 | frame.y = head_y + ((head_h - frame.height) / 2); | 837 | frame.y = head_y + ((head_h - frame.height) / 2); |
841 | frame.x_hidden = head_x + head_w - bevel_width - border_width; | 838 | frame.x_hidden = head_x + head_w - pixel - border_width; |
842 | frame.y_hidden = frame.y; | 839 | frame.y_hidden = frame.y; |
843 | break; | 840 | break; |
844 | 841 | ||
@@ -846,14 +843,14 @@ void Slit::reposition() { | |||
846 | frame.x = head_x + head_w - frame.width - border_width*2; | 843 | frame.x = head_x + head_w - frame.width - border_width*2; |
847 | frame.y = head_y + head_h - frame.height - border_width*2; | 844 | frame.y = head_y + head_h - frame.height - border_width*2; |
848 | frame.x_hidden = frame.x; | 845 | frame.x_hidden = frame.x; |
849 | frame.y_hidden = head_y + head_h - bevel_width - border_width; | 846 | frame.y_hidden = head_y + head_h - pixel - border_width; |
850 | break; | 847 | break; |
851 | 848 | ||
852 | case RIGHTBOTTOM: | 849 | case RIGHTBOTTOM: |
853 | default: | 850 | default: |
854 | frame.x = head_x + head_w - frame.width - border_width*2; | 851 | frame.x = head_x + head_w - frame.width - border_width*2; |
855 | frame.y = head_y + head_h - frame.height - border_width*2; | 852 | frame.y = head_y + head_h - frame.height - border_width*2; |
856 | frame.x_hidden = head_x + head_w - bevel_width - border_width; | 853 | frame.x_hidden = head_x + head_w - pixel - border_width; |
857 | frame.y_hidden = frame.y; | 854 | frame.y_hidden = frame.y; |
858 | break; | 855 | break; |
859 | } | 856 | } |