From 11f8d9c21f6da5abf01d942589914b26e04c20d9 Mon Sep 17 00:00:00 2001 From: rathnor Date: Sat, 28 Aug 2004 14:25:52 +0000 Subject: fix menu rendering bug with selected items --- ChangeLog | 3 +++ src/FbTk/Menu.cc | 14 +++++++------- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 99edeb4..73c8280 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ (Format: Year/Month/Day) Changes for 0.9.10: +*04/08/28: + * Fix menu render bug with previously highlighted items (Simon) + FbTk/Menu.cc *04/08/27: * Protect Fluxbox::shutdown better from being double-called (Simon) fluxbox.cc diff --git a/src/FbTk/Menu.cc b/src/FbTk/Menu.cc index 8c09c7f..95fa9ad 100644 --- a/src/FbTk/Menu.cc +++ b/src/FbTk/Menu.cc @@ -22,7 +22,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Menu.cc,v 1.72 2004/08/03 21:25:51 fluxgen Exp $ +// $Id: Menu.cc,v 1.73 2004/08/28 14:25:52 rathnor Exp $ //use GNU extensions #ifndef _GNU_SOURCE @@ -695,17 +695,17 @@ void Menu::internal_hide() { tmp->submenu()->internal_hide(); } - if (shown && shown->menu.window == menu.window) - shown = (Menu *) 0; - - torn = visible = false; - which_sub = which_press = which_sub = -1; - // if we have an active index we need to redraw it // as non active int old = m_active_index; m_active_index = -1; drawItem(old, true); // clear old area from highlight + + if (shown && shown->menu.window == menu.window) + shown = (Menu *) 0; + + torn = visible = false; + which_sub = which_press = which_sub = -1; menu.window.hide(); } -- cgit v0.11.2