tych0/qtile — pull request #7 by flacjacket (2014-07-24 18:56:53+00:00)
Title: Update Travis with new cffi stuff

* Swap xpyb for xcffib
* Swap pycairo/pygtk for cairocffi. Use https://github.com/tych0/cairocffi/tree/xcffib for cairocffi
* Use git version of cairo (picked the same version as in Ubuntu 14.04), pending #5
* Add Python 3 versions (these look to still have a couple problems...). I had problems getting pygobject 3.2 (used in 12.04) to compile, so I updated to 3.12 (used in 14.04), which needs updated GLib and GObject Introspection (picked versions in Ubuntu 14.04)

It looks like with Python 3, some of the tests aren't terribly reproducible, I'm not sure what is causing that. With Python 2, `test_kill` will consistently fail, which may have to do with `WM_DELETE_WINDOW`, tho I couldn't say where the problem is.

If I had to guess, I'd say it's in xcffib, as with xpyb, the command to set `WM_DELETE_WINDOW` is:
```
conn.core.ChangeProperty(xcb.xproto.PropMode.Replace,
window, wm_protocols,
xcb.xproto.Atom.ATOM, 32, 4,
struct.pack("=L", wm_delete_window))
```
while with xcffib, it must be:
```
conn.core.ChangeProperty(xcffib.xproto.PropMode.Replace,
window, wm_protocols,
xcffib.xproto.Atom.ATOM, 32, 1,
struct.pack("=L", wm_delete_window))
```
or
```
conn.core.ChangeProperty(xcffib.xproto.PropMode.Replace,
window, wm_protocols,
xcffib.xproto.Atom.ATOM, 32, 1,
[wm_delete_window])
```
Note change from `4` to `1`. Changing this value to 4 with xcffib will make it so the window does not appear.