fix a few drawwing issues, esp menu opening offscreen
simonb simonb
2 files changed,
14 insertions(+),
11 deletions(-)
M
ChangeLog
→
ChangeLog
@@ -1,5 +1,9 @@
(Format: Year/Month/Day) Changes for 0.9.13 +*05/04/15: + * Fixed a few drawing bugs created by last patch (Simon) + (titlebar no clear on resize, menu opening offscreen...) + Menu.cc FbWinFrame.cc *05/04/11: * Rework lots of stuff relating to transparency, esp menus+frame (Simon) + Massively reduce pixmap memory usage (view with xrestop)
M
src/FbTk/Menu.cc
→
src/FbTk/Menu.cc
@@ -388,10 +388,6 @@ setTitleVisibility(true);
} void Menu::updateMenu(int active_index) { - if (!m_visible) { - m_need_update = true; - return; - } if (m_title_vis) { menu.item_w = theme().titleFont().textWidth(menu.label.c_str(), menu.label.size());@@ -425,9 +421,6 @@ menu.sublevels = 0;
menu.persub = 0; } - if (menu.frame.alpha() != alpha()) - menu.frame.setAlpha(alpha()); - int itmp = (theme().itemHeight() * menu.persub); menu.frame_h = itmp < 1 ? 1 : itmp;@@ -448,7 +441,15 @@
if (new_height < 1) new_height = 1; + // must update main window size whether visible or not + // the rest can wait until the end menu.window.resize(new_width, new_height); + + if (!m_visible) + return; + + if (menu.frame.alpha() != alpha()) + menu.frame.setAlpha(alpha()); Pixmap tmp = 0; if (m_title_vis && m_need_update) {@@ -1267,10 +1268,8 @@ menu.frame.setBorderColor(theme().borderColor());
menu.window.setBorderWidth(theme().borderWidth()); menu.title.setBorderWidth(theme().borderWidth()); - - if (m_visible) { - updateMenu(); - } + + updateMenu(); }