don't mark menu as focused, even if it gets a FocusIn, when it's not visible
markt markt
2 files changed,
7 insertions(+),
2 deletions(-)
M
ChangeLog
→
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<N>.defaultDeco now allows same strings as apps file (Mark) Screen.cc/hh Window.cc Remember.cc/hh
M
src/FbTk/Menu.cc
→
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