robm/dzen — pull request #8 by TheUnknownCylon (2012-12-01 13:46:01+00:00)
Title: Updated clickable areas (1 bugfix + clickable in slave window support)

This pull request fixes a bug related to clickable areas, and adds clickable areas in the slave window.

* Bugfix: title bar clicks stopped working after the slave window gots an update.
Example command:

```bash
(echo "^ca(1, echo click)Header^ca()"; while true; sleep 1; do echo test$((i++)); done) | ./dzen2 -l 12
```

(The reason this happens is because `xorig` value is changed when the slave window got a redraw, but `xorig` is also used to determine whether a click happened on a clickable area).

* New feature: clickable areas in the slave window.

Example code

```bash
(echo "^ca(1, echo TitleClick)Header^ca()"; while true; sleep 1; do echo "^ca(1, echo SlaveClick)test$((i++))^ca()"; done) | ./dzen2 -l 12
```

For performance reasons, the clickable areas for the slave window and title window are separated. When one window gets an update, the clickable areas for that window only are re-calculated.