summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/events.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/events.c b/src/events.c
index 7ca9cb7..37bfc01 100644
--- a/src/events.c
+++ b/src/events.c
@@ -236,10 +236,10 @@ destroy_window (XDestroyWindowEvent *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);
}
- /* Since we may have switched windows, call the hook. */
- if (frame->win_number != EMPTY)
- hook_run (&rp_switch_win_hook);
withdraw_window (win);
}