aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMark Tiefenbruck <mark@fluxbox.org>2008-11-02 00:03:32 (GMT)
committerMark Tiefenbruck <mark@fluxbox.org>2008-11-02 00:03:32 (GMT)
commitf5fdbab98c437fe4eb5f74d82152a9a9ef7a47ed (patch)
tree11c703b7633fc4723075453165cd0a5906e55530 /src
parent3b9611b61ddc023225092a85b21867131fb363cc (diff)
downloadfluxbox_paul-f5fdbab98c437fe4eb5f74d82152a9a9ef7a47ed.zip
fluxbox_paul-f5fdbab98c437fe4eb5f74d82152a9a9ef7a47ed.tar.bz2
don't reload keys file on modifier map events, just re-grab keys
Diffstat (limited to 'src')
-rw-r--r--src/Keys.cc4
-rw-r--r--src/Keys.hh3
-rw-r--r--src/fluxbox.cc2
3 files changed, 8 insertions, 1 deletions
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() {
571 m_reloader->checkReload(); 571 m_reloader->checkReload();
572} 572}
573 573
574void Keys::regrab() {
575 setKeyMode(m_keylist);
576}
577
574void Keys::keyMode(const string& keyMode) { 578void Keys::keyMode(const string& keyMode) {
575 keyspace_t::iterator it = m_map.find(keyMode + ":"); 579 keyspace_t::iterator it = m_map.find(keyMode + ":");
576 if (it == m_map.end()) 580 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:
73 /// unregister window 73 /// unregister window
74 void unregisterWindow(Window win); 74 void unregisterWindow(Window win);
75 75
76 /// grab keys again when keymap changes
77 void regrab();
78
76 const std::string& filename() const { return m_filename; } 79 const std::string& filename() const { return m_filename; }
77 /** 80 /**
78 Load configuration from file 81 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) {
772 XRefreshKeyboardMapping(&e->xmapping); 772 XRefreshKeyboardMapping(&e->xmapping);
773 FbTk::KeyUtil::instance().init(); // reinitialise the key utils 773 FbTk::KeyUtil::instance().init(); // reinitialise the key utils
774 // reconfigure keys (if the mapping changes, they don't otherwise update 774 // reconfigure keys (if the mapping changes, they don't otherwise update
775 m_key->reload(); 775 m_key->regrab();
776 } 776 }
777 break; 777 break;
778 case CreateNotify: 778 case CreateNotify: