all repos — fluxbox @ c31e60a9c15493188b37000c877050ca1eadc02c

custom fork of the fluxbox windowmanager

revert focus when a menu is losing focus, so we dont get unfocused window after keyboard navigation in menu
fluxgen fluxgen
commit

c31e60a9c15493188b37000c877050ca1eadc02c

parent

bc672d4a1db5e6f61455146478bcb97d6f042db6

1 files changed, 21 insertions(+), 2 deletions(-)

jump to
M src/fluxbox.ccsrc/fluxbox.cc

@@ -22,7 +22,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: fluxbox.cc,v 1.221 2004/01/13 12:55:25 rathnor Exp $ +// $Id: fluxbox.cc,v 1.222 2004/01/16 11:28:00 fluxgen Exp $ #include "fluxbox.hh"

@@ -753,7 +753,26 @@ m_mousescreen = searchScreen(e->xcrossing.root);

} else if (e->type == PropertyNotify) m_last_time = e->xproperty.time; - + // we need to check focus out for menus before + // we call FbTk eventhandler + // so we can get FbTk::Menu::focused() before it sets to 0 + if (e->type == FocusOut && + FbTk::Menu::focused() != 0 && + FbTk::Menu::focused()->window() == e->xfocus.window) { + // find screen num + BScreen *screen = 0; + ScreenList::iterator it = m_screen_list.begin(); + ScreenList::iterator it_end = m_screen_list.end(); + for (; it != it_end; ++it) { + if ( (*it)->screenNumber() == + FbTk::Menu::focused()->fbwindow().screenNumber()) + screen = (*it); + } + if (screen != 0) + revertFocus(*screen); + } + } + // try FbTk::EventHandler first FbTk::EventManager::instance()->handleEvent(*e);