fix menu rendering bug with selected items

This commit is contained in:
rathnor 2004-08-28 14:25:52 +00:00
parent cbc8e23ed2
commit 11f8d9c21f
2 changed files with 10 additions and 7 deletions

View file

@ -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

View file

@ -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();
}