don't mark menu as focused, even if it gets a FocusIn, when it's not visible

This commit is contained in:
markt 2007-03-07 02:09:24 +00:00
parent 82f02f44c5
commit 4ed76f99b6
2 changed files with 7 additions and 2 deletions

View file

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

View file

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