From 3a3519197381416cc7a61a432e11a5358827fe0d Mon Sep 17 00:00:00 2001 From: Marco Peereboom Date: Tue, 19 Oct 2010 17:37:56 +0000 Subject: [PATCH] focus on root just in case there is nothing else to focus on. seems to fix the gimp issues where you end up with no keyboard action. --- scrotwm.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/scrotwm.c b/scrotwm.c index 1a4dedb..eb917a4 100644 --- a/scrotwm.c +++ b/scrotwm.c @@ -52,7 +52,7 @@ static const char *cvstag = "$scrotwm$"; -#define SWM_VERSION "0.9.26" +#define SWM_VERSION "0.9.27" #include #include @@ -4439,15 +4439,11 @@ unmanage_window(struct ws_win *win) parent->child_trans = NULL; } - if (count_win(win->ws, 0) > 1) { - /* work around for mplayer going full screen */ - if (!win->floating) - focus_prev(win); - } else - /* the last window is getting nuked, so make sure - the keyboard isn't left without focus */ - XSetInputFocus(display, PointerRoot, - PointerRoot, CurrentTime); + /* focus on root just in case */ + XSetInputFocus(display, PointerRoot, PointerRoot, CurrentTime); + + if (!win->floating) + focus_prev(win); TAILQ_REMOVE(&win->ws->winlist, win, entry); TAILQ_INSERT_TAIL(&win->ws->unmanagedlist, win, entry); -- 1.7.10.4