From 3503f75903207e8bc658559fb3df46ea0de55004 Mon Sep 17 00:00:00 2001 From: markt Date: Tue, 27 Feb 2007 17:46:48 +0000 Subject: lots of unrelated fixes --- src/Ewmh.cc | 10 +--------- src/FbTk/Menu.cc | 4 ++++ src/Keys.cc | 2 +- src/fluxbox.cc | 4 +++- 4 files changed, 9 insertions(+), 11 deletions(-) diff --git a/src/Ewmh.cc b/src/Ewmh.cc index 8dd1959..147b7d3 100644 --- a/src/Ewmh.cc +++ b/src/Ewmh.cc @@ -662,15 +662,7 @@ void Ewmh::updateState(FluxboxWindow &win) { } void Ewmh::updateLayer(FluxboxWindow &win) { - //!! TODO _NET_WM_WINDOW_TYPE - /* - if (win.getLayer() == Fluxbox::instance()->getAboveDockLayer()) { - // _NET_WM_STATE_BELOW - - } else if (win.getLayer() == Fluxbox::instance()->getBottomLayer()) { - // _NET_WM_STATE_ABOVE - } - */ + updateState(win); } void Ewmh::updateHints(FluxboxWindow &win) { diff --git a/src/FbTk/Menu.cc b/src/FbTk/Menu.cc index b5536f7..138eaf4 100644 --- a/src/FbTk/Menu.cc +++ b/src/FbTk/Menu.cc @@ -965,6 +965,10 @@ void Menu::motionNotifyEvent(XMotionEvent &me) { if (w == m_active_index) return; + // if another menu is focused, change focus to this one, so arrow keys + // work as expected + if (s_focused != this && s_focused != 0) + grabInputFocus(); if (validIndex(m_active_index) && w != m_active_index) { int old_active_index = m_active_index; diff --git a/src/Keys.cc b/src/Keys.cc index dbcff67..97a83bf 100644 --- a/src/Keys.cc +++ b/src/Keys.cc @@ -339,7 +339,7 @@ bool Keys::doAction(int type, unsigned int mods, unsigned int key) { // grab "None Escape" to exit keychain in the middle unsigned int esc = FbTk::KeyUtil::getKey("Escape"); - if (temp_key && temp_key->keylist.size()) { // emacs-style + if (temp_key && !temp_key->keylist.empty()) { // emacs-style if (!saved_keymode) saved_keymode = m_keylist; next_key = temp_key; diff --git a/src/fluxbox.cc b/src/fluxbox.cc index 42ff47d..468e723 100644 --- a/src/fluxbox.cc +++ b/src/fluxbox.cc @@ -733,7 +733,9 @@ void Fluxbox::handleEvent(XEvent * const e) { for (; it != it_end; ++it) { if ( (*it)->screenNumber() == FbTk::Menu::focused()->fbwindow().screenNumber()) { - FocusControl::revertFocus(**it); + FocusControl::setFocusedWindow(0); + m_revert_screen = *it; + m_revert_timer.start(); break; // found the screen, no more search } } -- cgit v0.11.2