From 321ba8b56a8dc5a70e24e1fc4d030cd28b6ab2b8 Mon Sep 17 00:00:00 2001 From: "Anselm R. Garbe" Date: Fri, 10 Mar 2006 16:54:07 +0100 Subject: [PATCH] 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) --- 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 index 9f3190fa..ba0fa843 100644 --- 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 index e1e24dc3..e0059b53 100644 --- 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 index 4de50098..d99330f0 100644 --- 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 index db82b641..71075b0a 100644 --- 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 index 69fffe5c..d894ac26 100644 --- 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 <