From 4ed76f99b61a65356c63d13c526e8e04642ea053 Mon Sep 17 00:00:00 2001 From: markt Date: Wed, 7 Mar 2007 02:09:24 +0000 Subject: don't mark menu as focused, even if it gets a FocusIn, when it's not visible --- ChangeLog | 5 ++++- src/FbTk/Menu.cc | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1f3e0c0..7903cfc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,10 @@ (Format: Year/Month/Day) Changes for 1.0rc3: +*07/03/07: + * Fixed a little bug with reverting focus after closing menu (Mark) + FbTk/Menu.cc *07/03/06: - * changed some handling of focusing/raising transient windows (Mark) + * Changed some handling of focusing/raising transient windows (Mark) Window.cc FocusControl.cc * session.screen.defaultDeco now allows same strings as apps file (Mark) Screen.cc/hh Window.cc Remember.cc/hh diff --git a/src/FbTk/Menu.cc b/src/FbTk/Menu.cc index 163fc83..a2326c4 100644 --- a/src/FbTk/Menu.cc +++ b/src/FbTk/Menu.cc @@ -816,7 +816,9 @@ void Menu::handleEvent(XEvent &event) { if (event.type == FocusOut) { if (s_focused == this) s_focused = 0; - } else if (event.type == FocusIn) { + // I don't know why, but I get a FocusIn event when closing the menu with + // the mouse over it -- probably an xorg bug, but it's easy to address here + } else if (event.type == FocusIn && m_visible) { if (s_focused != this) s_focused = this; // if there's a submenu open, focus it instead -- cgit v0.11.2