X-Git-Url: https://git.danieliu.xyz/?a=blobdiff_plain;f=main.c;h=ded47614f73539b42d736be85d8ab0eec202e301;hb=92e55c7c53cb808b584982ac8f6d69112d713fab;hp=4c7a1a4336c1b37be3b88e81db614f76d2602c70;hpb=d54444cfd73f5006bf58e29e50a4ed28d08f9435;p=dwm.git diff --git a/main.c b/main.c index 4c7a1a4..ded4761 100644 --- a/main.c +++ b/main.c @@ -201,6 +201,7 @@ main(int argc, char *argv[]) wmatom[WMDelete] = XInternAtom(dpy, "WM_DELETE_WINDOW", False); netatom[NetSupported] = XInternAtom(dpy, "_NET_SUPPORTED", False); netatom[NetWMName] = XInternAtom(dpy, "_NET_WM_NAME", False); + netatom[NetActiveWindow] = XInternAtom(dpy, "_NET_ACTIVE_WINDOW", False); XChangeProperty(dpy, root, netatom[NetSupported], XA_ATOM, 32, PropModeReplace, (unsigned char *) netatom, NetLast); @@ -240,6 +241,8 @@ main(int argc, char *argv[]) dc.drawable = XCreatePixmap(dpy, root, sw, bh, DefaultDepth(dpy, screen)); dc.gc = XCreateGC(dpy, root, 0, 0); + + strcpy(stext, "dwm-"VERSION); drawstatus(); issel = XQueryPointer(dpy, root, &w, &w, &i, &i, &i, &i, &mask); @@ -248,10 +251,9 @@ main(int argc, char *argv[]) wa.cursor = cursor[CurNormal]; XChangeWindowAttributes(dpy, root, CWEventMask | CWCursor, &wa); - strcpy(stext, "dwm-"VERSION); scan(); - /* main event loop, reads status text from stdin as well */ + /* main event loop, also reads status text from stdin */ while(running) { FD_ZERO(&rd); if(readin)