awesomeWM/awesome — pull request #57 by Elv13 (2014-10-26 01:35:15+00:00)
Title: tag: Improve tag property::index support (FS#1229)

This try to solve "index" not being in sync when using dynamic tagging. It look scarier than it is. The "index" feature is not really working, so it should improve it. As seen last time I played with this code, some people have very funny hacks using it, so we never know, it might break a thing or two, but I don't think so.

* Move the "index" setting burden to individual functions
instead of gettags().

* Add some properties earlier so the signal hooks will be called
with valid data.

* Fix a minor issue with restoring history when changing screen, won't really happen as most people move only selected tag, but it was there anyway, so better fix it.

From a complexity PoV, it remove some loops from gettags() and move them to add/remove/move/setscreen. As gettags() is called way more often than any of those, it should make Awesome a little faster too, but it's not the point.

I am not so sure every corner cases are fixed, but all I could find seem to be. If possible, have some third party testing in master and eventually move it to 3.5.*

**Testing done:**

* Tested with my Radical.impl.taglist widget in pure "property::index" mode. It now work and was broken before
* Tested with Tyrannical, so I created/deleted/moved a lot of tags and it seem to hold so far.
* The default config load
* Tested with Collision ctrl+alt+shift+arrow

**Testing not done:**

* Using shifty / eminent