summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorShawn Betts <sabetts@gmail.com>2007-12-07 12:12:07 -0800
committerShawn Betts <sabetts@gmail.com>2007-12-07 12:12:07 -0800
commit37933658a66f1d7f5cc00cbf83882b84cf8c8337 (patch)
treedb10164d7d13fdf734b5782cea56389326cbd2f6 /src
parentc322af661de758faab2a8035d1dbfd64b36a5082 (diff)
downloadratpoison-37933658a66f1d7f5cc00cbf83882b84cf8c8337.zip
call switchwin hook when a window in unmapped or destroyed
Diffstat (limited to 'src')
-rw-r--r--src/events.c6
1 files changed, 6 insertions, 0 deletions
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);
}