From 37933658a66f1d7f5cc00cbf83882b84cf8c8337 Mon Sep 17 00:00:00 2001 From: Shawn Betts Date: Fri, 7 Dec 2007 12:12:07 -0800 Subject: call switchwin hook when a window in unmapped or destroyed --- src/events.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') diff --git a/src/events.c b/src/events.c index bdc288f..25f7c1c 100644 --- a/src/events.c +++ b/src/events.c @@ -139,6 +139,9 @@ unmap_notify (XEvent *ev) if (frame->number == win->scr->current_frame && current_screen() == win->scr) set_active_frame (frame, 0); + /* Since we may have switched windows, call the hook. */ + if (frame->win_number != EMPTY) + hook_run (&rp_switch_win_hook); } withdraw_window (win); @@ -234,6 +237,9 @@ destroy_window (XDestroyWindowEvent *ev) && current_screen() == win->scr) set_active_frame (frame, 0); } + /* Since we may have switched windows, call the hook. */ + if (frame->win_number != EMPTY) + hook_run (&rp_switch_win_hook); withdraw_window (win); } -- cgit v1.2.3