Add close command, add close for xwayland

This commit is contained in:
emersion 2017-10-06 15:39:39 +02:00
parent 8ff548cdba
commit 972e9dbd1b
No known key found for this signature in database
GPG key ID: 0FDE7BE0E88F5E48
6 changed files with 28 additions and 8 deletions

View file

@ -28,6 +28,10 @@ static void keyboard_binding_execute(struct roots_keyboard *keyboard,
struct roots_server *server = keyboard->input->server;
if (strcmp(command, "exit") == 0) {
wl_display_terminate(server->wl_display);
} else if (strcmp(command, "close") == 0) {
if (keyboard->input->last_active_view != NULL) {
view_close(keyboard->input->last_active_view);
}
} else if (strncmp(exec_prefix, command, strlen(exec_prefix)) == 0) {
const char *shell_cmd = command + strlen(exec_prefix);
pid_t pid = fork();