mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-12-16 08:56:26 -05:00
Use a command string rather than an action enum
This commit is contained in:
parent
97d0fe8976
commit
238ded1578
3 changed files with 6 additions and 19 deletions
|
|
@ -21,12 +21,10 @@ static ssize_t keyboard_pressed_keysym_index(struct roots_keyboard *keyboard,
|
|||
}
|
||||
|
||||
static void keyboard_binding_execute(struct roots_keyboard *keyboard,
|
||||
struct binding_config *bc) {
|
||||
char *command) {
|
||||
struct roots_server *server = keyboard->input->server;
|
||||
switch (bc->action) {
|
||||
case BINDING_CONFIG_ACTION_QUIT:
|
||||
if (strcmp(command, "exit") == 0) {
|
||||
wl_display_terminate(server->wl_display);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -67,7 +65,7 @@ static void keyboard_keysym_press(struct roots_keyboard *keyboard,
|
|||
}
|
||||
|
||||
if (ok) {
|
||||
keyboard_binding_execute(keyboard, bc);
|
||||
keyboard_binding_execute(keyboard, bc->command);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue