From d7eebb62bd02b491f81811242a17bd134792b3d9 Mon Sep 17 00:00:00 2001 From: markt Date: Mon, 19 Mar 2007 06:18:25 +0000 Subject: active menu item wasn't getting reset properly when closed from [exec] with buttonpress --- ChangeLog | 2 ++ src/FbTk/Menu.cc | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index d46c3fa..de5d99b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,8 @@ (Format: Year/Month/Day) Changes for 1.0rc3: *07/03/19: + * Active menu item wasn't getting reset properly when menu closed (Mark) + FbTk/Menu.cc * Fixed some problems with toolbar sizing (Mark + thanks Julien Trolet) Toolbar.cc *07/03/18: diff --git a/src/FbTk/Menu.cc b/src/FbTk/Menu.cc index 1162b53..008eebd 100644 --- a/src/FbTk/Menu.cc +++ b/src/FbTk/Menu.cc @@ -883,11 +883,11 @@ void Menu::buttonReleaseEvent(XButtonEvent &re) { re.x > ix && re.x < (signed) (ix + menu.item_w) && re.y > iy && re.y < (signed) (iy + theme().itemHeight())) { menuitems[w]->click(re.button, re.time); + } else { + int old = m_active_index; + m_active_index = w; + clearItem(old); } - - int old = m_active_index; - m_active_index = w; - clearItem(old); clearItem(w); } } -- cgit v0.11.2