From: Michael D. Lowis Date: Thu, 17 Jan 2019 04:36:24 +0000 (-0500) Subject: raise, set focus, and set urgency X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=8565cc97a7e70a032d14bcb2f4df60f917a1d41e;p=projs%2Ftide.git raise, set focus, and set urgency --- diff --git a/src/registrar.c b/src/registrar.c index afef0c7..49e8a72 100644 --- a/src/registrar.c +++ b/src/registrar.c @@ -105,6 +105,15 @@ void win_open(XConf* x, Window winid, char* path, char* addr) { puts("window still valid, raising"); win_send(x, x->self, win->win, 0, "GOTO", strtoul(addr, NULL, 0)); win_send(x, x->self, winid, 0, "DONE", 0); + XMapRaised(x->display, win->win); + XSetInputFocus(x->display, win->win, RevertToNone, CurrentTime); + XWMHints *hints = XGetWMHints(x->display, win->win); + if (hints) { + hints->flags |= XUrgencyHint; + XSetWMHints(x->display, win->win, hints); + XFree(hints); + } + XSync(x->display, False); free(type); return; }