don't reload keys file on modifier map events, just re-grab keys
Mark Tiefenbruck mark@fluxbox.org
4 files changed,
11 insertions(+),
1 deletions(-)
M
src/Keys.cc
→
src/Keys.cc
@@ -571,6 +571,10 @@ m_reloader->setMainFile(m_filename);
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())
M
src/Keys.hh
→
src/Keys.hh
@@ -73,6 +73,9 @@ void registerWindow(Window win, FbTk::EventHandler &handler, int context);
/// 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
M
src/fluxbox.cc
→
src/fluxbox.cc
@@ -772,7 +772,7 @@ || e->xmapping.request == MappingModifier) {
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: