Add fullscreen command, fix view_at with fullscreen views

This commit is contained in:
emersion 2017-11-21 10:37:53 +01:00
parent 9e29621ec3
commit 9a6f799d8f
No known key found for this signature in database
GPG key ID: 0FDE7BE0E88F5E48
4 changed files with 128 additions and 88 deletions

View file

@ -95,6 +95,12 @@ static void keyboard_binding_execute(struct roots_keyboard *keyboard,
if (focus != NULL) {
view_close(focus);
}
} else if (strcmp(command, "fullscreen") == 0) {
struct roots_view *focus = roots_seat_get_focus(seat);
if (focus != NULL) {
bool is_fullscreen = focus->fullscreen_output != NULL;
view_set_fullscreen(focus, !is_fullscreen, NULL);
}
} else if (strcmp(command, "next_window") == 0) {
roots_seat_cycle_focus(seat);
} else if (strncmp(exec_prefix, command, strlen(exec_prefix)) == 0) {