]> Dogcows Code - chaz/openbox/blobdiff - src/Toolbar.cc
oops. fix workspace warping merge buglet
[chaz/openbox] / src / Toolbar.cc
index 8c2325b5c58c7da014b097482f5e270e43d12232..d2e2f15f717118ec3c073a276a8c4c75d7f66092 100644 (file)
@@ -633,16 +633,8 @@ void Toolbar::drawArrow(Drawable surface, bool left) const {
 
 
   if (left) {
-    if (style->left_button.mask == None) {
-      pts[0].x = hw - bullet_size;
-      pts[0].y = hh;
-      pts[1].x = 2 * bullet_size;
-      pts[1].y = bullet_size;
-      pts[2].x = 0;
-      pts[2].y = -(2 * bullet_size);
-      XFillPolygon(display, surface, pen.gc(), pts, 3, Convex,
-                   CoordModePrevious);
-    } else {
+#ifdef    BITMAPBUTTONS
+    if (style->left_button.mask != None) {
       XSetClipMask(blackbox->getXDisplay(), pen.gc(), style->left_button.mask);
       XSetClipOrigin(blackbox->getXDisplay(), pen.gc(),
                      (frame.button_w - style->left_button.w)/2,
@@ -651,23 +643,26 @@ void Toolbar::drawArrow(Drawable surface, bool left) const {
       XFillRectangle(blackbox->getXDisplay(), surface, pen.gc(),
                      (frame.button_w - style->left_button.w)/2,
                      (frame.button_w - style->left_button.h)/2,
-                     (frame.button_w + style->left_button.w)/2,
-                     (frame.button_w + style->left_button.h)/2);
+                     style->left_button.w, style->left_button.h);
 
       XSetClipMask(blackbox->getXDisplay(), pen.gc(), None);
       XSetClipOrigin(blackbox->getXDisplay(), pen.gc(), 0, 0);
-    }
-  } else {
-    if (style->right_button.mask == None) {
+    } else {
+#endif // BITMAPBUTTONS
       pts[0].x = hw - bullet_size;
-      pts[0].y = hh - bullet_size;
-      pts[1].x = (2 * bullet_size);
-      pts[1].y =  bullet_size;
-      pts[2].x = -(2 * bullet_size);
-      pts[2].y = bullet_size;
+      pts[0].y = hh;
+      pts[1].x = 2 * bullet_size;
+      pts[1].y = bullet_size;
+      pts[2].x = 0;
+      pts[2].y = -(2 * bullet_size);
       XFillPolygon(display, surface, pen.gc(), pts, 3, Convex,
                    CoordModePrevious);
-    } else {
+#ifdef    BITMAPBUTTONS      
+    }
+#endif // BITMAPBUTTONS
+  } else {
+#ifdef    BITMAPBUTTONS
+    if (style->right_button.mask != None) {
       XSetClipMask(blackbox->getXDisplay(), pen.gc(),
                    style->right_button.mask);
       XSetClipOrigin(blackbox->getXDisplay(), pen.gc(),
@@ -682,7 +677,19 @@ void Toolbar::drawArrow(Drawable surface, bool left) const {
 
       XSetClipMask(blackbox->getXDisplay(), pen.gc(), None);
       XSetClipOrigin(blackbox->getXDisplay(), pen.gc(), 0, 0);
+    } else {
+#endif // BITMAPBUTTONS
+      pts[0].x = hw - bullet_size;
+      pts[0].y = hh - bullet_size;
+      pts[1].x = (2 * bullet_size);
+      pts[1].y =  bullet_size;
+      pts[2].x = -(2 * bullet_size);
+      pts[2].y = bullet_size;
+      XFillPolygon(display, surface, pen.gc(), pts, 3, Convex,
+                   CoordModePrevious);
+#ifdef    BITMAPBUTTONS
     }
+#endif
   }
 }
 
This page took 0.022999 seconds and 4 git commands to generate.