all repos — fluxbox @ d948abb81b104dd1562015c4dfa0d080480b6ce2

custom fork of the fluxbox windowmanager

fixed parentrelative menu highlight bug
markt markt
commit

d948abb81b104dd1562015c4dfa0d080480b6ce2

parent

9db57d56d308fb0a1da54e16472cd0bbca2bdaee

2 files changed, 15 insertions(+), 12 deletions(-)

jump to
M ChangeLogChangeLog

@@ -1,5 +1,8 @@

(Format: Year/Month/Day) Changes for 1.0rc3: +*07/03/11: + * Fixed display bug with ParentRelative menu highlight (thanks Julien Trolet) + FbTk/Menu.cc *07/03/10: * Autogrouped windows weren't getting added to the workspace menu (Mark) Screen.cc
M src/FbTk/Menu.ccsrc/FbTk/Menu.cc

@@ -1214,19 +1214,19 @@ int item_x = (sbl * menu.item_w), item_y = (i * item_h);

FbPixmap buffer = FbPixmap(menu.frame, item_w, item_h, menu.frame.depth()); - if (menu.hilite_pixmap != ParentRelative) { - if (menu.hilite_pixmap) { - buffer.copyArea(menu.hilite_pixmap, - theme().hiliteGC().gc(), 0, 0, - 0, 0, - item_w, item_h); - } else { - buffer.fillRectangle(theme().hiliteGC().gc(), - 0, 0, item_w, item_h); - } - menu.frame.updateTransparent(item_x, item_y, item_w, item_h, buffer.drawable(), true); + bool parent_rel = menu.hilite_pixmap == ParentRelative; + Pixmap pixmap = parent_rel ? menu.frame_pixmap : menu.hilite_pixmap; + int pixmap_x = parent_rel ? item_x : 0, pixmap_y = parent_rel ? item_y : 0; + if (pixmap) { + buffer.copyArea(pixmap, + theme().hiliteGC().gc(), pixmap_x, pixmap_y, + 0, 0, + item_w, item_h); + } else { + buffer.fillRectangle(theme().hiliteGC().gc(), + 0, 0, item_w, item_h); } - + menu.frame.updateTransparent(item_x, item_y, item_w, item_h, buffer.drawable(), true); drawItem(buffer, index, true, true);