need to reset keybindings when keymap changes
This commit is contained in:
parent
398b63c7c5
commit
61b04e3366
2 changed files with 6 additions and 7 deletions
11
src/Keys.hh
11
src/Keys.hh
|
@ -75,8 +75,11 @@ public:
|
||||||
|
|
||||||
const std::string& filename() const { return m_filename; }
|
const std::string& filename() const { return m_filename; }
|
||||||
/**
|
/**
|
||||||
Reload configuration from filename
|
Load configuration from file
|
||||||
@return true on success, else false
|
*/
|
||||||
|
void reload();
|
||||||
|
/**
|
||||||
|
Reload configuration if keys file has changed
|
||||||
*/
|
*/
|
||||||
void reconfigure();
|
void reconfigure();
|
||||||
void keyMode(const std::string& keyMode);
|
void keyMode(const std::string& keyMode);
|
||||||
|
@ -94,10 +97,6 @@ private:
|
||||||
void ungrabButtons();
|
void ungrabButtons();
|
||||||
void grabWindow(Window win);
|
void grabWindow(Window win);
|
||||||
|
|
||||||
/**
|
|
||||||
Load configuration from file
|
|
||||||
*/
|
|
||||||
void reload();
|
|
||||||
// Load default keybindings for when there are errors loading the keys file
|
// Load default keybindings for when there are errors loading the keys file
|
||||||
void loadDefaults();
|
void loadDefaults();
|
||||||
void setKeyMode(t_key *keyMode);
|
void setKeyMode(t_key *keyMode);
|
||||||
|
|
|
@ -751,7 +751,7 @@ void Fluxbox::handleEvent(XEvent * const e) {
|
||||||
XRefreshKeyboardMapping(&e->xmapping);
|
XRefreshKeyboardMapping(&e->xmapping);
|
||||||
FbTk::KeyUtil::instance().init(); // reinitialise the key utils
|
FbTk::KeyUtil::instance().init(); // reinitialise the key utils
|
||||||
// reconfigure keys (if the mapping changes, they don't otherwise update
|
// reconfigure keys (if the mapping changes, they don't otherwise update
|
||||||
m_key->reconfigure();
|
m_key->reload();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case CreateNotify:
|
case CreateNotify:
|
||||||
|
|
Loading…
Reference in a new issue