summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/globals.c2
-rw-r--r--src/globals.h1
-rw-r--r--src/manage.c3
3 files changed, 6 insertions, 0 deletions
diff --git a/src/globals.c b/src/globals.c
index 2a954fd..b7306a6 100644
--- a/src/globals.c
+++ b/src/globals.c
@@ -223,12 +223,14 @@ LIST_HEAD (rp_switch_frame_hook);
LIST_HEAD (rp_switch_group_hook);
LIST_HEAD (rp_quit_hook);
LIST_HEAD (rp_restart_hook);
+LIST_HEAD (rp_delete_window_hook);
struct rp_hook_db_entry rp_hook_db[]=
{{"key", &rp_key_hook},
{"switchwin", &rp_switch_win_hook},
{"switchframe", &rp_switch_frame_hook},
{"switchgroup", &rp_switch_group_hook},
+ {"deletewindow", &rp_delete_window_hook},
{"quit", &rp_quit_hook},
{"restart", &rp_restart_hook},
{NULL, NULL}};
diff --git a/src/globals.h b/src/globals.h
index e8c9c38..080d31d 100644
--- a/src/globals.h
+++ b/src/globals.h
@@ -147,6 +147,7 @@ extern struct list_head rp_key_hook;
extern struct list_head rp_switch_win_hook;
extern struct list_head rp_switch_frame_hook;
extern struct list_head rp_switch_group_hook;
+extern struct list_head rp_delete_window_hook;
extern struct list_head rp_quit_hook;
extern struct list_head rp_restart_hook;
diff --git a/src/manage.c b/src/manage.c
index 9076b16..36bb973 100644
--- a/src/manage.c
+++ b/src/manage.c
@@ -904,6 +904,9 @@ withdraw_window (rp_window *win)
XSync (dpy, False);
ignore_badwindow--;
+
+ /* Call our hook */
+ hook_run (&rp_delete_window_hook);
}
/* Hide all other mapped windows except for win in win's frame. */