aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2004-01-16 11:28:00 (GMT)
committerfluxgen <fluxgen>2004-01-16 11:28:00 (GMT)
commitc31e60a9c15493188b37000c877050ca1eadc02c (patch)
treeeb5d71cb363e02816ab7b8c48d3d0c3cd9d56146
parentbc672d4a1db5e6f61455146478bcb97d6f042db6 (diff)
downloadfluxbox_paul-c31e60a9c15493188b37000c877050ca1eadc02c.zip
fluxbox_paul-c31e60a9c15493188b37000c877050ca1eadc02c.tar.bz2
revert focus when a menu is losing focus, so we dont get unfocused window after keyboard navigation in menu
-rw-r--r--src/fluxbox.cc23
1 files changed, 21 insertions, 2 deletions
diff --git a/src/fluxbox.cc b/src/fluxbox.cc
index 163caed..c67f51b 100644
--- a/src/fluxbox.cc
+++ b/src/fluxbox.cc
@@ -22,7 +22,7 @@
22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23// DEALINGS IN THE SOFTWARE. 23// DEALINGS IN THE SOFTWARE.
24 24
25// $Id: fluxbox.cc,v 1.221 2004/01/13 12:55:25 rathnor Exp $ 25// $Id: fluxbox.cc,v 1.222 2004/01/16 11:28:00 fluxgen Exp $
26 26
27#include "fluxbox.hh" 27#include "fluxbox.hh"
28 28
@@ -753,7 +753,26 @@ void Fluxbox::handleEvent(XEvent * const e) {
753 } else if (e->type == PropertyNotify) 753 } else if (e->type == PropertyNotify)
754 m_last_time = e->xproperty.time; 754 m_last_time = e->xproperty.time;
755 755
756 756 // we need to check focus out for menus before
757 // we call FbTk eventhandler
758 // so we can get FbTk::Menu::focused() before it sets to 0
759 if (e->type == FocusOut &&
760 FbTk::Menu::focused() != 0 &&
761 FbTk::Menu::focused()->window() == e->xfocus.window) {
762 // find screen num
763 BScreen *screen = 0;
764 ScreenList::iterator it = m_screen_list.begin();
765 ScreenList::iterator it_end = m_screen_list.end();
766 for (; it != it_end; ++it) {
767 if ( (*it)->screenNumber() ==
768 FbTk::Menu::focused()->fbwindow().screenNumber())
769 screen = (*it);
770 }
771 if (screen != 0)
772 revertFocus(*screen);
773 }
774 }
775
757 // try FbTk::EventHandler first 776 // try FbTk::EventHandler first
758 FbTk::EventManager::instance()->handleEvent(*e); 777 FbTk::EventManager::instance()->handleEvent(*e);
759 778