diff options
| author | BossCode45 <human.cyborg42@gmail.com> | 2023-06-05 20:35:32 +1200 |
|---|---|---|
| committer | BossCode45 <human.cyborg42@gmail.com> | 2023-06-05 20:35:32 +1200 |
| commit | 0b539b0b0278f2d7c2b7629e6d28d8463cba2688 (patch) | |
| tree | 3a0b47f09dc58f2c14ba06443f2a5fe88d166e2f /keybinds.cpp | |
| parent | e9cc5756dbb0a2d079a7b5e3438d79945f819df5 (diff) | |
| download | YATwm-0b539b0b0278f2d7c2b7629e6d28d8463cba2688.tar.gz YATwm-0b539b0b0278f2d7c2b7629e6d28d8463cba2688.zip | |
Added a very basic config, and fixed some stuff
NOTE: for some reason toggling doesn't work anymore
Diffstat (limited to 'keybinds.cpp')
| -rw-r--r-- | keybinds.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/keybinds.cpp b/keybinds.cpp index 85e9e4e..6e4abfd 100644 --- a/keybinds.cpp +++ b/keybinds.cpp @@ -10,7 +10,7 @@ using std::string, std::cout, std::endl; -KeybindsModule::KeybindsModule(CommandsModule& commandsModule, Config& cfg, Globals& globals) +KeybindsModule::KeybindsModule(CommandsModule& commandsModule, Config& cfg, Globals& globals, void (*updateMousePos)()) :commandsModule(commandsModule), globals(globals), cfg(cfg) @@ -19,6 +19,7 @@ KeybindsModule::KeybindsModule(CommandsModule& commandsModule, Config& cfg, Glob bindArgs[0] = STR; bindArgs[1] = STR_REST; commandsModule.addCommand("bind", &KeybindsModule::bind, 2, bindArgs, this); + this->updateMousePos = updateMousePos; } const void KeybindsModule::handleKeypress(XKeyEvent e) @@ -27,7 +28,7 @@ const void KeybindsModule::handleKeypress(XKeyEvent e) //cout << "Key Pressed" << endl; //cout << "\tState: " << e.state << endl; //cout << "\tCode: " << XKeysymToString(XKeycodeToKeysym(globals.dpy, e.keycode, 0)) << endl; - //updateMousePos(); + updateMousePos(); const unsigned int masks = ShiftMask | ControlMask | Mod1Mask | Mod4Mask; for(Keybind bind : binds) @@ -80,7 +81,6 @@ const void KeybindsModule::bind(const CommandArg* argv) } } bind.command = argv[1].str; - cout << bind.modifiers << endl; KeyCode c = XKeysymToKeycode(globals.dpy, bind.key); XGrabKey(globals.dpy, c, bind.modifiers, globals.root, False, GrabModeAsync, GrabModeAsync); binds.push_back(bind); |
