mirror of
https://github.com/0intro/wmii
synced 2025-01-21 01:22:07 +03:00
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:
parent
096520d74d
commit
321ba8b56a
@ -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);
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user