From 73579df0d75446bf7121ddac571952775a2192f2 Mon Sep 17 00:00:00 2001 From: "Enno Boland (tox)" Date: Wed, 28 Oct 2009 21:37:15 +0100 Subject: closing tab with middlemouse, circling tabs with mousewheel. --- tabbed.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'tabbed.c') diff --git a/tabbed.c b/tabbed.c index 039ede3..b240e1d 100644 --- a/tabbed.c +++ b/tabbed.c @@ -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; } } -- cgit v1.2.3