aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormarkt <markt>2007-03-11 19:07:42 (GMT)
committermarkt <markt>2007-03-11 19:07:42 (GMT)
commitd948abb81b104dd1562015c4dfa0d080480b6ce2 (patch)
treefb24c695d2e20b64e953af3ed7087d21a5c83246 /src
parent9db57d56d308fb0a1da54e16472cd0bbca2bdaee (diff)
downloadfluxbox-d948abb81b104dd1562015c4dfa0d080480b6ce2.zip
fluxbox-d948abb81b104dd1562015c4dfa0d080480b6ce2.tar.bz2
fixed parentrelative menu highlight bug
Diffstat (limited to 'src')
-rw-r--r--src/FbTk/Menu.cc24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/FbTk/Menu.cc b/src/FbTk/Menu.cc
index a2326c4..1162b53 100644
--- a/src/FbTk/Menu.cc
+++ b/src/FbTk/Menu.cc
@@ -1214,19 +1214,19 @@ void Menu::highlightItem(int index) {
1214 1214
1215 FbPixmap buffer = FbPixmap(menu.frame, item_w, item_h, menu.frame.depth()); 1215 FbPixmap buffer = FbPixmap(menu.frame, item_w, item_h, menu.frame.depth());
1216 1216
1217 if (menu.hilite_pixmap != ParentRelative) { 1217 bool parent_rel = menu.hilite_pixmap == ParentRelative;
1218 if (menu.hilite_pixmap) { 1218 Pixmap pixmap = parent_rel ? menu.frame_pixmap : menu.hilite_pixmap;
1219 buffer.copyArea(menu.hilite_pixmap, 1219 int pixmap_x = parent_rel ? item_x : 0, pixmap_y = parent_rel ? item_y : 0;
1220 theme().hiliteGC().gc(), 0, 0, 1220 if (pixmap) {
1221 0, 0, 1221 buffer.copyArea(pixmap,
1222 item_w, item_h); 1222 theme().hiliteGC().gc(), pixmap_x, pixmap_y,
1223 } else { 1223 0, 0,
1224 buffer.fillRectangle(theme().hiliteGC().gc(), 1224 item_w, item_h);
1225 0, 0, item_w, item_h); 1225 } else {
1226 } 1226 buffer.fillRectangle(theme().hiliteGC().gc(),
1227 menu.frame.updateTransparent(item_x, item_y, item_w, item_h, buffer.drawable(), true); 1227 0, 0, item_w, item_h);
1228 } 1228 }
1229 1229 menu.frame.updateTransparent(item_x, item_y, item_w, item_h, buffer.drawable(), true);
1230 1230
1231 drawItem(buffer, index, true, true); 1231 drawItem(buffer, index, true, true);
1232 1232