wmii

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

commit 321ba8b56a8dc5a70e24e1fc4d030cd28b6ab2b8
parent 096520d74da6a2b72864f96f1e6cd5db4c8f6c78
Author: Anselm R. Garbe <garbeam@wmii.de>
Date:   Fri, 10 Mar 2006 16:54:07 +0100

simplified wmiirc /def/keys writing thx ality!, and removed the warp action (if we ever need such stuff, it might go to a separate app, but I think we don't need it at all for now)


Diffstat:
cmd/wm/client.c | 10----------
cmd/wm/fs.c | 5-----
cmd/wm/mouse.c | 22----------------------
cmd/wm/wm.h | 1-
rc/wmiirc | 5+----
5 files changed, 1 insertion(+), 42 deletions(-)

diff --git a/cmd/wm/client.c b/cmd/wm/client.c @@ -78,15 +78,6 @@ set_client_state(Client * c, int state) PropModeReplace, (unsigned char *) data, 2); } -static void -client_focus_event(Client *c) -{ - char buf[256]; - snprintf(buf, sizeof(buf), "CF %d %d %d %d\n", c->frame[c->sel]->rect.x, c->frame[c->sel]->rect.y, - c->frame[c->sel]->rect.width, c->frame[c->sel]->rect.height); - write_event(buf); -} - void focus_client(Client *c) { @@ -109,7 +100,6 @@ focus_client(Client *c) XSetInputFocus(dpy, c->win, RevertToPointerRoot, CurrentTime); draw_client(c); XSync(dpy, False); - client_focus_event(c); if(i > 0 && f->area->mode == Colstack) arrange_area(f->area); } diff --git a/cmd/wm/fs.c b/cmd/wm/fs.c @@ -1180,11 +1180,6 @@ xwrite(IXPConn *c, Fcall *fcall) srv.running = 0; else if(!strncmp(buf, "select", 6)) select_tag(&buf[7]); - else if(!strncmp(buf, "warp ", 5)) { - char *err; - if((err = warp_mouse(&buf[5]))) - return err; - } else return Enocommand; break; diff --git a/cmd/wm/mouse.c b/cmd/wm/mouse.c @@ -623,25 +623,3 @@ ungrab_mouse(Window w, unsigned long mod, unsigned int button) XUngrabButton(dpy, button, mod | num_lock_mask | LockMask, w); } } - -char * -warp_mouse(char *arg) -{ - const char *errstr; - char *sx = arg, *sy; - unsigned int x, y; - sy = strchr(sx, ' '); - if(!sy) - return "invalid argument"; - *sy = 0; - sy++; - x = cext_strtonum(sx, 0, rect.width, &errstr); - if(errstr) - return "invalid x argument"; - y = cext_strtonum(sy, 0, rect.height, &errstr); - if(errstr) - return "invalid y argument"; - XWarpPointer(dpy, None, root, 0, 0, 0, 0, x, y); - XSync(dpy, False); - return nil; -} diff --git a/cmd/wm/wm.h b/cmd/wm/wm.h @@ -284,7 +284,6 @@ Align xy2align(XRectangle *rect, int x, int y); void drop_move(Client *c, XRectangle *new, XPoint *pt); void grab_mouse(Window w, unsigned long mod, unsigned int button); void ungrab_mouse(Window w, unsigned long mod, unsigned int button); -char *warp_mouse(char *arg); /* rule.c */ void match_tags(char *ruledef, Client *c); diff --git a/rc/wmiirc b/rc/wmiirc @@ -45,10 +45,7 @@ status & proglist $OLD_PATH >/tmp/ns.$USER.$DISPLAY/progs & # SHORTCUTS -while read key -do - wmiir write /def/keys -done <<EOF +wmiir write /def/keys <<EOF $MODKEY-Control-c $MODKEY-Control-w,y $MODKEY-Control-q,y