summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--dwm.h1
-rw-r--r--event.c12
-rw-r--r--tag.c18
3 files changed, 2 insertions, 29 deletions
diff --git a/dwm.h b/dwm.h
index d54fdc0..999f027 100644
--- a/dwm.h
+++ b/dwm.h
@@ -144,7 +144,6 @@ void tag(const char *arg); /* tags sel with arg's index */
144void toggletag(const char *arg); /* toggles sel tags with arg's index */ 144void toggletag(const char *arg); /* toggles sel tags with arg's index */
145void toggleview(const char *arg); /* toggles the tag with arg's index (in)visible */ 145void toggleview(const char *arg); /* toggles the tag with arg's index (in)visible */
146void view(const char *arg); /* views the tag with arg's index */ 146void view(const char *arg); /* views the tag with arg's index */
147void shiftview(const char *arg); /* views next(1)/previous(-1) tag */
148 147
149/* util.c */ 148/* util.c */
150void *emallocz(unsigned int size); /* allocates zero-initialized memory, exits on error */ 149void *emallocz(unsigned int size); /* allocates zero-initialized memory, exits on error */
diff --git a/event.c b/event.c
index 1454b0b..b870821 100644
--- a/event.c
+++ b/event.c
@@ -16,7 +16,7 @@ typedef struct {
16 16
17KEYS 17KEYS
18 18
19#define CLEANMASK(mask) (mask & ~(numlockmask | LockMask)) 19#define CLEANMASK(mask) (mask & ~(numlockmask | LockMask))
20#define MOUSEMASK (BUTTONMASK | PointerMotionMask) 20#define MOUSEMASK (BUTTONMASK | PointerMotionMask)
21 21
22static Client * 22static Client *
@@ -135,19 +135,11 @@ buttonpress(XEvent *e) {
135 else 135 else
136 toggleview(buf); 136 toggleview(buf);
137 } 137 }
138 else if(ev->button == Button4)
139 shiftview("-1");
140 else if(ev->button == Button5)
141 shiftview("1");
142 return; 138 return;
143 } 139 }
144 } 140 }
145 if(ev->x < x + blw && ev->button == Button1) 141 if((ev->x < x + blw) && ev->button == Button1)
146 setlayout(NULL); 142 setlayout(NULL);
147 else if(ev->button == Button4)
148 focusclient("-1");
149 else if(ev->button == Button5)
150 focusclient("1");
151 } 143 }
152 else if((c = getclient(ev->window))) { 144 else if((c = getclient(ev->window))) {
153 focus(c); 145 focus(c);
diff --git a/tag.c b/tag.c
index 2311ade..c44954b 100644
--- a/tag.c
+++ b/tag.c
@@ -99,24 +99,6 @@ settags(Client *c, Client *trans) {
99 c->tags[i] = seltag[i]; 99 c->tags[i] = seltag[i];
100} 100}
101 101
102void
103shiftview(const char *arg) {
104 int i, j;
105
106 for(i = 0; !seltag[i]; i++);
107 for(j = i + 1; j < ntags && !seltag[j]; j++);
108 if(j < ntags)
109 return; /* more than one tag selected */
110 seltag[i] = False;
111 i += arg ? atoi(arg) : 0;
112 if(i < 0)
113 i = ntags - 1;
114 else if(i >= ntags)
115 i = 0;
116 seltag[i] = True;
117 lt->arrange();
118}
119
120void 102void
121tag(const char *arg) { 103tag(const char *arg) {
122 int i; 104 int i;