From f5fdbab98c437fe4eb5f74d82152a9a9ef7a47ed Mon Sep 17 00:00:00 2001 From: Mark Tiefenbruck Date: Sat, 1 Nov 2008 17:03:32 -0700 Subject: don't reload keys file on modifier map events, just re-grab keys --- ChangeLog | 3 +++ src/Keys.cc | 4 ++++ src/Keys.hh | 3 +++ src/fluxbox.cc | 2 +- 4 files changed, 11 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 67ee11d..bc9f25a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ (Format: Year/Month/Day) Changes for 1.1.2 +*08/11/01: + * Don't reload keys file when modifier map changes, just regrab (Mark) + Keys.cc/hh fluxbox.cc *08/10/15: * Don't allow resizing to negative dimensions (Mathias) Window.cc/hh diff --git a/src/Keys.cc b/src/Keys.cc index 658820e..ac25588 100644 --- a/src/Keys.cc +++ b/src/Keys.cc @@ -571,6 +571,10 @@ void Keys::reconfigure() { m_reloader->checkReload(); } +void Keys::regrab() { + setKeyMode(m_keylist); +} + void Keys::keyMode(const string& keyMode) { keyspace_t::iterator it = m_map.find(keyMode + ":"); if (it == m_map.end()) diff --git a/src/Keys.hh b/src/Keys.hh index 9502643..af64a1d 100644 --- a/src/Keys.hh +++ b/src/Keys.hh @@ -73,6 +73,9 @@ public: /// unregister window void unregisterWindow(Window win); + /// grab keys again when keymap changes + void regrab(); + const std::string& filename() const { return m_filename; } /** Load configuration from file diff --git a/src/fluxbox.cc b/src/fluxbox.cc index 706556c..93768da 100644 --- a/src/fluxbox.cc +++ b/src/fluxbox.cc @@ -772,7 +772,7 @@ void Fluxbox::handleEvent(XEvent * const e) { XRefreshKeyboardMapping(&e->xmapping); FbTk::KeyUtil::instance().init(); // reinitialise the key utils // reconfigure keys (if the mapping changes, they don't otherwise update - m_key->reload(); + m_key->regrab(); } break; case CreateNotify: -- cgit v0.11.2