Mercurial > hg > index.fcgi > dwm > dwm-3.6.1-12pba
comparison event.c @ 4:a54de16f8277
fix taskbar behavior when exceeding MAX_TASKS; bound moveresize() to windowarea
author | paulo@localhost |
---|---|
date | Fri, 24 Apr 2009 01:34:17 -0700 |
parents | faa4cb9d7bd6 |
children | 0968b3739b8d |
comparison
equal
deleted
inserted
replaced
2:94fa084f0eb6 | 3:1282da32047b |
---|---|
165 case Button5: pushdown(NULL); break; | 165 case Button5: pushdown(NULL); break; |
166 } | 166 } |
167 } | 167 } |
168 else if(tbarwin == ev->window) { | 168 else if(tbarwin == ev->window) { |
169 int i, w; | 169 int i, w; |
170 for(i=0, c = clients; c; c = c->next) { | |
171 if(isvisible(c)) | |
172 i++; | |
173 } | |
174 if(!i || i >= MAX_TASKS) | |
175 return; | |
176 else | |
177 w = sw/i; | |
170 switch(ev->button) { | 178 switch(ev->button) { |
171 case Button4: focusprev(NULL); return; break; | 179 case Button4: focusprev(NULL); return; break; |
172 case Button5: focusnext(NULL); return; break; | 180 case Button5: focusnext(NULL); return; break; |
173 } | 181 } |
174 for(i=0, c = clients; c; c = c->next) { | |
175 if(isvisible(c)) | |
176 i++; | |
177 } | |
178 if(!i && i >= MAX_TASKS) | |
179 return; | |
180 else | |
181 w = sw/i; | |
182 for(i=1, c = clients; c && i*w<=sw; c = c->next, i++) { | 182 for(i=1, c = clients; c && i*w<=sw; c = c->next, i++) { |
183 for(; c && !isvisible(c); c = c->next); | 183 for(; c && !isvisible(c); c = c->next); |
184 if(i*w > ev->x) { | 184 if(i*w > ev->x) { |
185 switch(ev->button) { | 185 switch(ev->button) { |
186 case Button1: focus(c); restack(); break; | 186 case Button1: focus(c); restack(); break; |