aboutsummaryrefslogtreecommitdiff
path: root/rootston/keyboard.c
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2017-10-27 13:33:38 -0400
committerGitHub <noreply@github.com>2017-10-27 13:33:38 -0400
commit0572abbb252edfc27232c08893b7440561ca171d (patch)
tree03b3181facac74dd0327bb6b14577404e69cb5a9 /rootston/keyboard.c
parent4bee96bd301015dd6ceb2087ec07a1cb77c1e5d7 (diff)
parent315c01ba0fc8567ca0320be2d3f28b26faebe607 (diff)
Merge pull request #345 from emersion/remove-last-active-view
Remove input.last_active_view
Diffstat (limited to 'rootston/keyboard.c')
-rw-r--r--rootston/keyboard.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/rootston/keyboard.c b/rootston/keyboard.c
index 142e9c71..c91c326b 100644
--- a/rootston/keyboard.c
+++ b/rootston/keyboard.c
@@ -29,8 +29,10 @@ static void keyboard_binding_execute(struct roots_keyboard *keyboard,
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);
+ if (server->desktop->views->length > 0) {
+ struct roots_view *view =
+ server->desktop->views->items[server->desktop->views->length-1];
+ view_close(view);
}
} else if (strcmp(command, "next_window") == 0) {
if (server->desktop->views->length > 0) {