From 6e774e79e1e747464f61e0d756c1fd07ed9ad777 Mon Sep 17 00:00:00 2001 From: simonb <simonb> Date: Fri, 15 Apr 2005 00:39:54 +0000 Subject: fix a few drawwing issues, esp menu opening offscreen --- ChangeLog | 4 ++++ src/FbTk/Menu.cc | 21 ++++++++++----------- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index d5deeb4..a8ee190 100644 --- a/ChangeLog +++ b/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) diff --git a/src/FbTk/Menu.cc b/src/FbTk/Menu.cc index 370afb8..a4aed46 100644 --- a/src/FbTk/Menu.cc +++ b/src/FbTk/Menu.cc @@ -388,10 +388,6 @@ void Menu::enableTitle() { } 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 @@ void Menu::updateMenu(int active_index) { 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,8 +441,16 @@ void Menu::updateMenu(int active_index) { 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) { tmp = menu.title_pixmap; @@ -1267,10 +1268,8 @@ void Menu::reconfigure() { menu.window.setBorderWidth(theme().borderWidth()); menu.title.setBorderWidth(theme().borderWidth()); - - if (m_visible) { - updateMenu(); - } + + updateMenu(); } -- cgit v0.11.2