fix menu redraw bug for real
authorDana Jansens <danakj@orodu.net>
Wed, 20 Nov 2002 05:22:38 +0000 (05:22 +0000)
committerDana Jansens <danakj@orodu.net>
Wed, 20 Nov 2002 05:22:38 +0000 (05:22 +0000)
CHANGELOG
src/Basemenu.cc

index 9c393f46320240130f0425e3371fdf23fa93dea3..daa557cb18966b6beaa42c4adf1ae0969755478a 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -14,8 +14,8 @@ Changelog for Openbox:
    don't work at all for high-ascii letters, which are
    used in the non-english locales.
 
- * Fix menu redraw bug when dragging them off-screen or (Scott Moynes)
-   under other menus, with Xft fonts.
+ * Fix menu redraw bug when dragging them off-screen or (Scott Moynes,
+   under other menus, with Xft fonts.                    Ben Jansens)
 
  * Build fixes for xftlsfonts and for openbox on        (Marius Nita)
    redhat systems.
index 3c096eff59f4423b96f4aefd327e3e38dad6df00..02bd643500225050174471163c2cf50be67204bd 100644 (file)
@@ -611,11 +611,6 @@ void Basemenu::drawItem(int index, bool highlight, bool clear,
       dooppsel = False;
   }
 
-#ifdef    XFT
-  if (dotext)
-    XClearArea(display, menu.frame, text_x, text_y , text_w, text_h, False);
-#endif // XFT
-
   if (dohilite && highlight && (menu.hilite_pixmap != ParentRelative)) {
     if (menu.hilite_pixmap)
       XCopyArea(display, menu.hilite_pixmap, menu.frame,
@@ -945,8 +940,12 @@ void Basemenu::exposeEvent(XExposeEvent *ee) {
       for (int ii = id; ii <= id_d && it != end; ++it, ii++) {
         const int index = ii + (i * menu.persub);
         // redraw the item
-        drawItem(index, (which_sub == index), False,
-                 ee->x, ee->y, ee->width, ee->height);
+        drawItem(index, (which_sub == index),
+#ifdef XFT
+                 True);
+#else
+                 False, ee->x, ee->y, ee->width, ee->height);
+#endif // XFT
       }
     }
   }