]> code.delx.au - spectrwm/commitdiff
Fix issue where _NET_ACTIVE_WINDOW is ignored on unmanaged windows.
authorReginald Kennedy <rk@rejii.com>
Mon, 16 Jul 2012 19:33:36 +0000 (03:33 +0800)
committerReginald Kennedy <rk@rejii.com>
Mon, 16 Jul 2012 20:04:31 +0000 (04:04 +0800)
ok marco

spectrwm.c

index 2ff50af57625603435881c3a3625e1223662bdd2..5b97af2f11104da3f14fa6d2668cdb6cb11d9774 100644 (file)
@@ -6981,14 +6981,21 @@ visibilitynotify(XEvent *e)
 void
 clientmessage(XEvent *e)
 {
-       XClientMessageEvent *ev;
-       struct ws_win *win;
+       XClientMessageEvent     *ev;
+       struct ws_win           *win;
 
        ev = &e->xclient;
 
        win = find_window(ev->window);
-       if (win == NULL)
+       if (win == NULL) {
+               if (ev->message_type == ewmh[_NET_ACTIVE_WINDOW].atom) {
+                       DNPRINTF(SWM_D_EVENT, "clientmessage: request focus on "
+                           "unmanaged window.\n");
+                       e->xmaprequest.window = ev->window;
+                       maprequest(e);
+               }
                return;
+       }
 
        DNPRINTF(SWM_D_EVENT, "clientmessage: window: 0x%lx, type: %ld\n",
            ev->window, ev->message_type);