From cb5c5c3b1ad477ec724f764d8de02b96c4c35af5 Mon Sep 17 00:00:00 2001 From: Marco Peereboom Date: Thu, 1 Oct 2009 21:27:19 +0000 Subject: [PATCH] Fix bug where a transient destroy would not give back the focus to the parent when the mouse was over the transient window. --- scrotwm.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scrotwm.c b/scrotwm.c index 6964df7..d31cde5 100644 --- a/scrotwm.c +++ b/scrotwm.c @@ -3494,7 +3494,11 @@ destroynotify(XEvent *e) /* find a window to focus */ ws = win->ws; wl = &ws->winlist; - if (ws->focus == win) { + + /* if we are transient give focus to parent */ + if (win->transient) + winfocus = find_window(win->transient); + else if (ws->focus == win) { if (TAILQ_FIRST(wl) == win) winfocus = TAILQ_NEXT(win, entry); else { -- 1.7.10.4