diff options
author | gotmor <gotmor@f2baff5b-bf2c-0410-a398-912abdc3d8b2> | 2009-02-13 15:18:51 +0000 |
---|---|---|
committer | gotmor <gotmor@f2baff5b-bf2c-0410-a398-912abdc3d8b2> | 2009-02-13 15:18:51 +0000 |
commit | 945c9936a036e2c24186aba12e0e8bf402f139fd (patch) | |
tree | 628e44e2ae886d6b6c1efcc9b26408decb3858cb /main.c | |
parent | 56a428c495dd0caae0c506bec0f16dff1770cd36 (diff) | |
download | dzen-945c9936a036e2c24186aba12e0e8bf402f139fd.tar.gz dzen-945c9936a036e2c24186aba12e0e8bf402f139fd.zip |
first bloody support for ^ca(button,cmd) ... ^ca()
as of now it has the following limitations:
* only works in the title window
* does not work with "-expand"
* probably some other issues
git-svn-id: http://dzen.googlecode.com/svn/trunk@251 f2baff5b-bf2c-0410-a398-912abdc3d8b2
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -27,6 +27,8 @@ Dzen dzen = {0}; static int last_cnt = 0; typedef void sigfunc(int); +click_a sens_areas[MAX_CLICKABLE_AREAS]; +int sens_areas_cnt=0; static void @@ -638,6 +640,15 @@ handle_xev(void) { if(ev.xbutton.window == dzen.slave_win.line[i]) dzen.slave_win.sel_line = i; } + + /* clickable areas */ + for(i=0; i<20; 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)) + spawn(sens_areas[i].cmd); + } switch(ev.xbutton.button) { case Button1: do_action(button1); |