Skip to content

Commit

Permalink
Fixed top_gap IPC segfault issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Joshua Ervin committed Dec 20, 2018
1 parent 2f15572 commit 061718b
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions wm.c
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ static void ipc_snap_right(long *d);
static void ipc_cardinal_focus(long *d);
static void ipc_cycle_focus(long *d);
static void ipc_pointer_move(long *d);
static void ipc_top_gap(long *d);
static void load_config(char *conf_path);
static void manage_client_focus(struct client *c);
static void manage_new_window(Window w, XWindowAttributes *wa);
Expand Down Expand Up @@ -194,6 +195,7 @@ static void (*ipc_handler[IPCLast])(long *) =
[IPCCardinalFocus] = ipc_cardinal_focus,
[IPCCycleFocus] = ipc_cycle_focus,
[IPCPointerMove] = ipc_pointer_move,
[IPCTopGap] = ipc_top_gap,
};

/* Give focus to the given client in the given direction */
Expand Down Expand Up @@ -357,6 +359,7 @@ delete_client(struct client *c)

/* Delete in the focus list */
/* I'll factor this out later */
/* Or actually it might not be so easy... */
if (f_list[ws] == c)
f_list[ws] = f_list[ws]->fnext;
else
Expand Down Expand Up @@ -789,6 +792,15 @@ ipc_pointer_move(long *d)
}
}

static void
ipc_top_gap(long *d)
{
int data = d[1];
conf.top_gap = data;

refresh_config();
}

static void
load_config(char *conf_path)
{
Expand Down

0 comments on commit 061718b

Please sign in to comment.