mirror of
https://cagebreak.project-repo.co/cagebreak.git
synced 2026-08-22 05:24:22 +02:00
Add support for closing windows
This commit is contained in:
parent
daddc8f2e5
commit
73e8db1fa3
6 changed files with 29 additions and 0 deletions
|
|
@ -549,6 +549,11 @@ keybinding_split_output(struct cg_output *output, bool vertical) {
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
keybinding_close_view(struct cg_view *view) {
|
||||
view->impl->close(view);
|
||||
}
|
||||
|
||||
static void
|
||||
keybinding_split_vertical(struct cg_server *server) {
|
||||
keybinding_split_output(server->curr_output, true);
|
||||
|
|
@ -964,6 +969,9 @@ run_action(enum keybinding_action action, struct cg_server *server,
|
|||
case KEYBINDING_CONFIGURE_OUTPUT:
|
||||
keybinding_configure_output(server, data.o_cfg);
|
||||
break;
|
||||
case KEYBINDING_CLOSE_VIEW:
|
||||
keybinding_close_view(server->curr_output->workspaces[server->curr_output->curr_workspace]->focused_tile->view);
|
||||
break;
|
||||
default: {
|
||||
wlr_log(WLR_ERROR,
|
||||
"run_action was called with a value not present in \"enum "
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue