summaryrefslogtreecommitdiff
path: root/keybinds.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'keybinds.cpp')
-rw-r--r--keybinds.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/keybinds.cpp b/keybinds.cpp
index 6e4abfd..3a431f0 100644
--- a/keybinds.cpp
+++ b/keybinds.cpp
@@ -33,7 +33,7 @@ const void KeybindsModule::handleKeypress(XKeyEvent e)
const unsigned int masks = ShiftMask | ControlMask | Mod1Mask | Mod4Mask;
for(Keybind bind : binds)
{
- if(bind.modifiers == (e.state & masks) && bind.key == XKeycodeToKeysym(globals.dpy, e.keycode, 0))
+ if(bind.modifiers == (e.state & masks) && bind.key == XLookupKeysym(&e, 0))
{
commandsModule.runCommand(bind.command);
}
@@ -89,4 +89,5 @@ const void KeybindsModule::bind(const CommandArg* argv)
const void KeybindsModule::clearKeybinds()
{
XUngrabButton(globals.dpy, AnyKey, AnyModifier, globals.root);
+ binds = std::vector<Keybind>();
}