mirror of
https://cagebreak.project-repo.co/cagebreak.git
synced 2026-08-09 15:19:11 +02:00
Release 1.4.0
- Add support for closing windows - Fix Issue 13 - Remove unnecessary header includes
This commit is contained in:
parent
c7c0c46fbe
commit
31d53c5a8d
28 changed files with 100 additions and 70 deletions
22
keybinding.c
22
keybinding.c
|
|
@ -1,12 +1,6 @@
|
|||
#define _POSIX_C_SOURCE 200809L
|
||||
|
||||
#include <signal.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/sysmacros.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/wait.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <wayland-server-core.h>
|
||||
#include <wlr/backend/multi.h>
|
||||
|
|
@ -22,7 +16,6 @@
|
|||
#include "server.h"
|
||||
#include "view.h"
|
||||
#include "workspace.h"
|
||||
#include "xdg_shell.h"
|
||||
|
||||
int
|
||||
keybinding_resize(struct keybinding_list *list) {
|
||||
|
|
@ -549,6 +542,14 @@ keybinding_split_output(struct cg_output *output, bool vertical) {
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
keybinding_close_view(struct cg_view *view) {
|
||||
if(view == NULL) {
|
||||
return;
|
||||
}
|
||||
view->impl->close(view);
|
||||
}
|
||||
|
||||
static void
|
||||
keybinding_split_vertical(struct cg_server *server) {
|
||||
keybinding_split_output(server->curr_output, true);
|
||||
|
|
@ -964,6 +965,11 @@ 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