aboutsummaryrefslogtreecommitdiff
path: root/monsterwm.c
diff options
context:
space:
mode:
Diffstat (limited to 'monsterwm.c')
-rw-r--r--monsterwm.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/monsterwm.c b/monsterwm.c
index 1133f34..a3c4336 100644
--- a/monsterwm.c
+++ b/monsterwm.c
@@ -96,6 +96,7 @@ static void switch_mode(const Arg *arg);
static void tile(void);
static void togglepanel();
static void update_current(void);
+static void unmapnotify(XEvent *e);
static client* wintoclient(Window w);
static int xerrorstart();
@@ -134,6 +135,7 @@ static void (*events[LASTEvent])(XEvent *e) = {
[KeyPress] = keypress,
[MapRequest] = maprequest,
[PropertyNotify] = propertynotify,
+ [UnmapNotify] = unmapnotify,
};
void addwindow(Window w) {
@@ -682,6 +684,11 @@ void togglepanel() {
tile();
}
+void unmapnotify(XEvent *e) {
+ client *c = wintoclient(e->xunmap.window);
+ if (c && e->xunmap.send_event) XDestroyWindow(dis, c->win);
+}
+
void update_current(void) {
if (!current) { XDeleteProperty(dis, root, netatoms[NET_ACTIVE]); return; }
int border_width = (!head->next || head->next->istransient || mode == MONOCLE) ? 0 : BORDER_WIDTH;