summaryrefslogtreecommitdiff
path: root/app/cwm
diff options
context:
space:
mode:
authorOkan Demirmen <okan@cvs.openbsd.org>2013-10-19 00:24:55 +0000
committerOkan Demirmen <okan@cvs.openbsd.org>2013-10-19 00:24:55 +0000
commitbf01af9fdcfffe33bae2c8ace2ebd3bd22b61e79 (patch)
tree4044af3b1e27ef23e66f8463c7debf481875859b /app/cwm
parentdaa0f8c40983c390576f334018832365f0728a14 (diff)
For clients that support WM_TAKE_FOCUS in their WM_PROTOCOLS property, send
a ClientMessage event.
Diffstat (limited to 'app/cwm')
-rw-r--r--app/cwm/client.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/cwm/client.c b/app/cwm/client.c
index 912adc456..100439082 100644
--- a/app/cwm/client.c
+++ b/app/cwm/client.c
@@ -15,7 +15,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $OpenBSD: client.c,v 1.137 2013/10/03 13:51:59 okan Exp $
+ * $OpenBSD: client.c,v 1.138 2013/10/19 00:24:54 okan Exp $
*/
#include <sys/param.h>
@@ -213,6 +213,8 @@ client_setactive(struct client_ctx *cc, int fg)
XInstallColormap(X_Dpy, cc->colormap);
XSetInputFocus(X_Dpy, cc->win,
RevertToPointerRoot, CurrentTime);
+ if (cc->xproto & _WM_TAKE_FOCUS)
+ client_msg(cc, cwmh[WM_TAKE_FOCUS]);
conf_grab_mouse(cc->win);
/*
* If we're in the middle of alt-tabbing, don't change