]> Dogcows Code - chaz/openbox/blobdiff - src/Basemenu.cc
was ending up using the wrong cache items. now i find and release it every time a...
[chaz/openbox] / src / Basemenu.cc
index 2dd6af7049f07993011e2b925e490c88a7eec192..b6b242b6d1562ff0973cc82a987757acf3cf6dbd 100644 (file)
@@ -442,7 +442,7 @@ void Basemenu::move(int x, int y) {
 void Basemenu::redrawTitle(void) {
   const char *text = (! menu.label.empty()) ? getLabel() :
     i18n(BasemenuSet, BasemenuBlackboxMenu, "Blackbox Menu");
-  int dx = menu.bevel_w, len = strlen(text);
+  int dx = menu.bevel_w;
   unsigned int l;
   MenuStyle *style = screen->getMenuStyle();
 
@@ -536,6 +536,7 @@ bool Basemenu::hasSubmenu(int index) {
 
 void Basemenu::drawItem(int index, bool highlight, bool clear,
                         int x, int y, unsigned int w, unsigned int h) {
+  fprintf(stderr, "DRAW ITEM\n");
   BasemenuItem *item = find(index);
   if (! item) return;
 
@@ -544,7 +545,7 @@ void Basemenu::drawItem(int index, bool highlight, bool clear,
   int sbl = index / menu.persub, i = index - (sbl * menu.persub);
   int item_x = (sbl * menu.item_w), item_y = (i * menu.item_h);
   int hilite_x = item_x, hilite_y = item_y, hoff_x = 0, hoff_y = 0;
-  int text_x = 0, text_y = 0, len = strlen(text), sel_x = 0, sel_y = 0;
+  int text_x = 0, text_y = 0, sel_x = 0, sel_y = 0;
   unsigned int hilite_w = menu.item_w, hilite_h = menu.item_h, text_w = 0,
     text_h = 0;
   unsigned int half_w = menu.item_h / 2, quarter_w = menu.item_h / 4;
@@ -628,6 +629,7 @@ void Basemenu::drawItem(int index, bool highlight, bool clear,
   }
 
   if (dotext && text) {
+    fprintf(stderr, "FONT: %s\nTEXT: %s\n", style->f_font->name().c_str(), text);
     style->f_font->drawString(menu.frame, text_x, text_y,
                               (highlight ? style->h_text :
                                (item->isEnabled() ? style->f_text :
This page took 0.021983 seconds and 4 git commands to generate.