version 1.25, 2017/08/30 10:33:57 |
version 1.26, 2018/07/04 12:30:52 |
|
|
}; |
}; |
|
|
static void |
static void |
notify_hook(struct cmdq_item *item, struct notify_entry *ne) |
notify_hook1(struct cmdq_item *item, struct notify_entry *ne) |
{ |
{ |
struct cmd_find_state fs; |
struct cmd_find_state fs; |
struct hook *hook; |
struct hook *hook; |
|
|
if (strcmp(ne->name, "session-window-changed") == 0) |
if (strcmp(ne->name, "session-window-changed") == 0) |
control_notify_session_window_changed(ne->session); |
control_notify_session_window_changed(ne->session); |
|
|
notify_hook(item, ne); |
notify_hook1(item, ne); |
|
|
if (ne->client != NULL) |
if (ne->client != NULL) |
server_client_unref(ne->client); |
server_client_unref(ne->client); |
|
|
|
|
new_item = cmdq_get_callback(notify_callback, ne); |
new_item = cmdq_get_callback(notify_callback, ne); |
cmdq_append(NULL, new_item); |
cmdq_append(NULL, new_item); |
|
} |
|
|
|
void |
|
notify_hook(struct cmdq_item *item, const char *name) |
|
{ |
|
struct notify_entry ne; |
|
|
|
memset(&ne, 0, sizeof ne); |
|
|
|
ne.name = name; |
|
cmd_find_copy_state(&ne.fs, &item->target); |
|
|
|
ne.client = item->client; |
|
ne.session = item->target.s; |
|
ne.window = item->target.w; |
|
ne.pane = item->target.wp->id; |
|
|
|
notify_hook1(item, &ne); |
} |
} |
|
|
void |
void |