From: Reginald Kennedy Date: Mon, 16 Jul 2012 19:33:36 +0000 (+0800) Subject: Fix issue where _NET_ACTIVE_WINDOW is ignored on unmanaged windows. X-Git-Url: https://jasonwoof.com/gitweb/?a=commitdiff_plain;h=ef048ac6ee49f942ee0029e04dfd8697a08f3d10;p=spectrwm.git Fix issue where _NET_ACTIVE_WINDOW is ignored on unmanaged windows. ok marco --- diff --git a/spectrwm.c b/spectrwm.c index 2ff50af..5b97af2 100644 --- a/spectrwm.c +++ b/spectrwm.c @@ -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);