aboutsummaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
authorgotmor <gotmor@f2baff5b-bf2c-0410-a398-912abdc3d8b2>2010-06-13 16:36:34 +0000
committergotmor <gotmor@f2baff5b-bf2c-0410-a398-912abdc3d8b2>2010-06-13 16:36:34 +0000
commitdb58aac6a88f369fc109005548ad9170ee8b7720 (patch)
tree2583447cdc18cd9842447c10778c1520a6a40d59 /main.c
parent36e01d9e60e3b15387de51c5197a7c0143549fef (diff)
downloaddzen-db58aac6a88f369fc109005548ad9170ee8b7720.tar.gz
dzen-db58aac6a88f369fc109005548ad9170ee8b7720.zip
added support for nested ^ca() commands, thanks to Devin J. Pohly
git-svn-id: http://dzen.googlecode.com/svn/trunk@268 f2baff5b-bf2c-0410-a398-912abdc3d8b2
Diffstat (limited to 'main.c')
-rw-r--r--main.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/main.c b/main.c
index 8159888..f42ab6f 100644
--- a/main.c
+++ b/main.c
@@ -702,13 +702,14 @@ handle_xev(void) {
}
/* clickable areas */
- for(i=0; i<sens_areas_cnt; i++) {
+ for(i=sens_areas_cnt; i>=0; i--) {
if(ev.xbutton.window == dzen.title_win.win &&
ev.xbutton.button == sens_areas[i].button &&
(ev.xbutton.x >= sens_areas[i].start_x+xorig &&
ev.xbutton.x <= sens_areas[i].end_x+xorig) &&
(ev.xbutton.y >= sens_areas[i].start_y &&
- ev.xbutton.y <= sens_areas[i].end_y)) {
+ ev.xbutton.y <= sens_areas[i].end_y) &&
+ sens_areas[i].active) {
spawn(sens_areas[i].cmd);
sa_clicked++;
break;