aboutsummaryrefslogtreecommitdiff
path: root/rootston/keyboard.c
diff options
context:
space:
mode:
authorTony Crisci <tony@dubstepdish.com>2017-12-08 09:22:44 -0500
committerTony Crisci <tony@dubstepdish.com>2017-12-08 09:22:44 -0500
commit35188834db182db43b407b58db167950fab05477 (patch)
tree4ce63cc7f7f01f1e7cf7fb0f6994c4306ae4cad2 /rootston/keyboard.c
parente3542d879d50d6239ad4ca24b4d30520fef40a87 (diff)
parent381a646d2fbcb1b488e1551438444ac267f39138 (diff)
Merge branch 'master' into feature/xwm-selection
Diffstat (limited to 'rootston/keyboard.c')
-rw-r--r--rootston/keyboard.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/rootston/keyboard.c b/rootston/keyboard.c
index f3fc9a85..85033613 100644
--- a/rootston/keyboard.c
+++ b/rootston/keyboard.c
@@ -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) {
@@ -106,6 +112,11 @@ static void keyboard_binding_execute(struct roots_keyboard *keyboard,
} else if (pid == 0) {
execl("/bin/sh", "/bin/sh", "-c", shell_cmd, (void *)NULL);
}
+ } else if (strcmp(command, "maximize") == 0) {
+ struct roots_view *focus = roots_seat_get_focus(seat);
+ if (focus != NULL) {
+ view_maximize(focus, !focus->maximized);
+ }
} else {
wlr_log(L_ERROR, "unknown binding command: %s", command);
}