From: Marco Peereboom Date: Thu, 1 Oct 2009 21:27:19 +0000 (+0000) Subject: Fix bug where a transient destroy would not give back the focus to the X-Git-Url: https://jasonwoof.com/gitweb/?a=commitdiff_plain;h=cb5c5c3b1ad477ec724f764d8de02b96c4c35af5;p=spectrwm.git Fix bug where a transient destroy would not give back the focus to the parent when the mouse was over the transient window. --- 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 {