JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
focus on root just in case there is nothing else to focus on. seems to
authorMarco Peereboom <marco@conformal.com>
Tue, 19 Oct 2010 17:37:56 +0000 (17:37 +0000)
committerMarco Peereboom <marco@conformal.com>
Tue, 19 Oct 2010 17:37:56 +0000 (17:37 +0000)
fix the gimp issues where you end up with no keyboard action.

scrotwm.c

index 1a4dedb..eb917a4 100644 (file)
--- 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 <stdio.h>
 #include <stdlib.h>
@@ -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);