The currently included patch is buggy. It uses a static variable times_called which should be private for each screen. Therefore, it doesn't work correctly in xinerama setups (usually one screen stops fading earlier and after that the other screen continues to fade for another 16 frames).
The graphical glitches result from the optimization approach of the current patch. It uses 16 frames streched over 1500ms. Every new image is computed from the previous one. Therefore, rounding errors add up, yielding incorrect colors in the final image. However, the speedup is significant compared to the original implementation. The original implementation computes the correct frames by bending between the start image and end image. However, the computation is redundant. See my attached patch which implements fading without color glitches. In contrast to the original implementation it uses a lookup table which is precomputed for each frames. It just takes 256 bytes of memory. It is slower than the additive implementation in the current patch, but is faster than the original one. And it doesn't have the bug with multiple screens. ** Attachment added: "smoother fading without color glitches and multiple screen bug" http://librarian.launchpad.net/6582374/13_smoother_fading.patch -- Logging out on a LCD produces a fade effect that is not pleasant https://launchpad.net/bugs/12389 -- desktop-bugs mailing list desktop-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/desktop-bugs