char stext[1024];
int tsel = DEFTAG;
int screen, sx, sy, sw, sh, bx, by, bw, bh, mw;
char stext[1024];
int tsel = DEFTAG;
int screen, sx, sy, sw, sh, bx, by, bw, bh, mw;
- res = win_property(w, wmatom[WMProtocols], XA_ATOM, 20L, &protocols);
+ res = win_property(w, wmatom[WMProtocols], XA_ATOM, 20L,
+ ((unsigned char **)&protocols));
screen = DefaultScreen(dpy);
root = RootWindow(dpy, screen);
screen = DefaultScreen(dpy);
root = RootWindow(dpy, screen);
dc.drawable = XCreatePixmap(dpy, root, sw, bh, DefaultDepth(dpy, screen));
dc.gc = XCreateGC(dpy, root, 0, 0);
dc.drawable = XCreatePixmap(dpy, root, sw, bh, DefaultDepth(dpy, screen));
dc.gc = XCreateGC(dpy, root, 0, 0);
drawstatus();
issel = XQueryPointer(dpy, root, &w, &w, &i, &i, &i, &i, &mask);
drawstatus();
issel = XQueryPointer(dpy, root, &w, &w, &i, &i, &i, &i, &mask);
wa.cursor = cursor[CurNormal];
XChangeWindowAttributes(dpy, root, CWEventMask | CWCursor, &wa);
wa.cursor = cursor[CurNormal];
XChangeWindowAttributes(dpy, root, CWEventMask | CWCursor, &wa);
FD_SET(ConnectionNumber(dpy), &rd);
i = select(ConnectionNumber(dpy) + 1, &rd, 0, 0, 0);
FD_SET(ConnectionNumber(dpy), &rd);
i = select(ConnectionNumber(dpy) + 1, &rd, 0, 0, 0);
- if(FD_ISSET(STDIN_FILENO, &rd)) {
- if(!fgets(stext, sizeof(stext), stdin))
- break;
- else
+ if(readin && FD_ISSET(STDIN_FILENO, &rd)) {
+ readin = NULL != fgets(stext, sizeof(stext), stdin);
+ if(readin)