mirror of
https://github.com/0intro/wmii
synced 2025-02-13 12:54:53 +03:00
grab frame instead of client area (much more convenient)
This commit is contained in:
parent
a0c4b1b908
commit
ac6bd022ca
@ -87,12 +87,12 @@ focus_client(Client *c)
|
||||
f->area->view->sel = i;
|
||||
f->area->sel = frame2index(f);
|
||||
if(old && (old != c)) {
|
||||
grab_mouse(old->win, AnyModifier, Button1);
|
||||
grab_mouse(old->framewin, AnyModifier, Button1);
|
||||
draw_client(old);
|
||||
}
|
||||
ungrab_mouse(c->win, AnyModifier, AnyButton);
|
||||
grab_mouse(c->win, Mod1Mask, Button1);
|
||||
grab_mouse(c->win, Mod1Mask, Button3);
|
||||
ungrab_mouse(c->framewin, AnyModifier, AnyButton);
|
||||
grab_mouse(c->framewin, Mod1Mask, Button1);
|
||||
grab_mouse(c->framewin, Mod1Mask, Button3);
|
||||
|
||||
restack_view(f->area->view);
|
||||
|
||||
|
@ -69,19 +69,6 @@ handle_buttonpress(XEvent *e)
|
||||
}
|
||||
}
|
||||
else if((c = win2clientframe(ev->window))) {
|
||||
if(ev->button == Button1) {
|
||||
if(sel_client() != c) {
|
||||
focus(c);
|
||||
return;
|
||||
}
|
||||
}
|
||||
if(c->nframe) {
|
||||
snprintf(buf, sizeof(buf), "ClientClick %d %d\n",
|
||||
frame2index(c->frame[c->sel]) + 1, ev->button);
|
||||
write_event(buf, True);
|
||||
}
|
||||
}
|
||||
else if((c = win2client(ev->window))) {
|
||||
ev->state &= valid_mask;
|
||||
if(ev->state & Mod1Mask) {
|
||||
focus(c);
|
||||
@ -102,7 +89,6 @@ handle_buttonpress(XEvent *e)
|
||||
}
|
||||
else if(ev->button == Button1)
|
||||
focus(c);
|
||||
|
||||
if(c->nframe) {
|
||||
snprintf(buf, sizeof(buf), "ClientClick %d %d\n",
|
||||
frame2index(c->frame[c->sel]) + 1, ev->button);
|
||||
|
Loading…
x
Reference in New Issue
Block a user