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)

This commit is contained in:
Anselm R. Garbe 2006-03-10 16:54:07 +01:00
parent 096520d74d
commit 321ba8b56a
5 changed files with 1 additions and 42 deletions

View File

@ -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);
}

View File

@ -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;

View File

@ -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;
}

View File

@ -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);

View File

@ -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