Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/config/parse_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -983,6 +983,7 @@ FuncType parse_func_name(char *func_name, Arg *arg, char *arg_value,
(*arg).i = atoi(arg_value);
} else if (strcmp(func_name, "killclient") == 0) {
func = killclient;
(*arg).v = strdup(arg_value);
} else if (strcmp(func_name, "centerwin") == 0) {
func = centerwin;
} else if (strcmp(func_name, "focuslast") == 0) {
Expand Down
6 changes: 5 additions & 1 deletion src/dispatch/bind_define.h
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,11 @@ int32_t killclient(const Arg *arg) {
return 0;
c = selmon->sel;
if (c) {
pending_kill_client(c);
if (arg->v && strcmp(arg->v, "force") == 0) {
pending_force_kill_client(c);
} else {
pending_kill_client(c);
}
}
return 0;
}
Expand Down
8 changes: 8 additions & 0 deletions src/mango.c
Original file line number Diff line number Diff line change
Expand Up @@ -751,6 +751,7 @@ static bool check_hit_no_border(Client *c);
static void reset_keyboard_layout(void);
static void client_update_oldmonname_record(Client *c, Monitor *m);
static void pending_kill_client(Client *c);
static void pending_force_kill_client(Client *c);
static uint32_t get_tags_first_tag_num(uint32_t source_tags);
static void set_layer_open_animaiton(LayerSurface *l, struct wlr_box geo);
static void init_fadeout_layers(LayerSurface *l);
Expand Down Expand Up @@ -3972,6 +3973,13 @@ void keypressmod(struct wl_listener *listener, void *data) {
}
}

void pending_force_kill_client(Client *c) {
if (!c)
return;
kill(c->pid, SIGKILL);
}


void pending_kill_client(Client *c) {
if (!c || c->iskilling)
return;
Expand Down