wmii

git clone git://oldgit.suckless.org/wmii/
Log | Files | Refs | README | LICENSE

commit 39ca1c4676f8a5ef2a5200b89c0db60b2cf193d8
parent d17e46ac2ede0296fe5091897751fc391cbbf018
Author: garbeam <garbeam@mmv.wmii.de>
Date:   Wed, 28 Dec 2005 16:00:22 +0200

fixed wmiir2 issue for echo -n calls


Diffstat:
cmd/wm/mouse.c | 8++------
cmd/wmiir2.c | 6+++---
2 files changed, 5 insertions(+), 9 deletions(-)

diff --git a/cmd/wm/mouse.c b/cmd/wm/mouse.c @@ -621,10 +621,6 @@ center_pointer(Frame * f) XQueryPointer(dpy, f->win, &dummy, &dummy, &i, &i, &wex, &wey, &dmask); XTranslateCoordinates(dpy, f->win, root, wex, wey, &ex, &ey, &dummy); /* suppress EnterNotify's while mouse warping */ - XSelectInput(dpy, root, ROOT_MASK & ~EnterWindowMask); - XSync(dpy, False); - XWarpPointer(dpy, None, f->win, 0, 0, 0, 0, f->rect.width / 2, - f->rect.height / 2); - XSync(dpy, False); - XSelectInput(dpy, root, ROOT_MASK); + XWarpPointer(dpy, None, f->win, 0, 0, 0, 0, f->rect.width / 2, f->rect.height / 2); + XSync(dpy, True); } diff --git a/cmd/wmiir2.c b/cmd/wmiir2.c @@ -215,8 +215,7 @@ main(int argc, char *argv[]) } } if(!sockfile) { - fprintf(stderr, "%s", - "wmiir: error: WMIIR_SOCKET environment not set\n"); + fprintf(stderr, "%s", "wmiir: error: WMIIR_SOCKET environment not set\n"); usage(); } /* open socket */ @@ -226,7 +225,8 @@ main(int argc, char *argv[]) } /* wether perform directly or read from stdin */ while(fgets(line, 4096, stdin)) { - line[strlen(line) - 2] = 0; + if (line[strlen(line) - 1] == '\n') + line[strlen(line) - 1] = 0; if((stdin_argc = cext_tokenize(stdin_argv, 3, line, ' '))) { if((ret = perform_cmd(stdin_argc, stdin_argv))) break;