Parially refactor commands to take a *Seat

This commit is contained in:
Isaac Freund
2020-04-13 19:25:37 +02:00
parent b822084f39
commit 3cb52c4898
4 changed files with 116 additions and 115 deletions

View File

@ -36,11 +36,11 @@ pub const Seat = struct {
/// Handle any user-defined keybinding for the passed keysym and modifiers
/// Returns true if the key was handled
pub fn handleKeybinding(self: Self, keysym: c.xkb_keysym_t, modifiers: u32) bool {
pub fn handleKeybinding(self: *Self, keysym: c.xkb_keysym_t, modifiers: u32) bool {
for (self.input_manager.server.config.keybinds.items) |keybind| {
if (modifiers == keybind.modifiers and keysym == keybind.keysym) {
// Execute the bound command
keybind.command(self.input_manager.server, keybind.arg);
keybind.command(self, keybind.arg);
return true;
}
}