diff options
| author | Enno Boland (tox) <tox@s01.de> | 2009-10-28 21:37:15 +0100 |
|---|---|---|
| committer | Enno Boland (tox) <tox@s01.de> | 2009-10-28 21:37:15 +0100 |
| commit | 73579df0d75446bf7121ddac571952775a2192f2 (patch) | |
| tree | 50b83641b5aa80f13d34d7cf6e9d6ac4be7643c4 /tabbed.c | |
| parent | 826c6000e2aa0c3662f8d4b13b86e3cf0d9086df (diff) | |
| download | tabbed-73579df0d75446bf7121ddac571952775a2192f2.tar.gz | |
closing tab with middlemouse, circling tabs with mousewheel.
Diffstat (limited to 'tabbed.c')
| -rw-r--r-- | tabbed.c | 16 |
1 files changed, 15 insertions, 1 deletions
@@ -161,13 +161,27 @@ buttonpress(const XEvent *e) { const XButtonPressedEvent *ev = &e->xbutton; int i; Client *c; + Arg arg; c = getfirsttab(); if(c != clients && ev->x < TEXTW(before)) return; for(i = 0; c; c = c->next, i++) { if(c->tabx > ev->x) { - focus(c); + switch(ev->button) { + case Button1: + focus(c); + break; + case Button2: + focus(c); + killclient(NULL); + break; + case Button4: + case Button5: + arg.i = ev->button == Button4 ? -1 : 1; + rotate(&arg); + break; + } break; } } |