Some time ago I’ve done a proof-of-concept how one can make KWin’s compositing effects
use non-linear timelines. Before that, a KWin animation would feel a bit static. Think
of minimising a window. It would abruptly start moving at a constant speed and stop at
some point in the same, abrupt way. Now we have a wonderful class in Qt, called QTimeLine
that provides some additional curveshapes, making it easier to show accelerated or slowing
down movements. After some discussions on the KWin mailinglist, I’ve implemented a smallish
wrapper class around QTimeLine that is tailored towards the needs of KWin’s effects.
After review by Mr KWin, Lubos, I’ve committed it to KDE’s SVN last Friday, and along with
it ‘port’ of the minization, the desktop grid and the coverswitch effect. Making those
effects use the new KWin::TimeLine class wasn’t hard at all (well, modulo on where I
needed some help ;-)). In fact, the coverswitch effect was done in 5 minutes during the
last beer of the Tokamak Plasma sprint. Now at least those three effects feel more natural,
less static. More effects will be ported later on, if you want to get your hands dirty, feel
free to have a look at it.
coverswitch effect more beautiful, and made the mousemark one (the one that shows stars
revolving around your mousepointer) a bit less jumpy — it now ‘feels’ like it’s always
revolving, but not always shown — and not ‘start at position 0 whenever shown’. Last night
I’ve excluded some window types from the brand-spanking-new Wobbly Windows effect in KWin.
Previously, menu would wobble as they pop up, making for a hectic user experience when
opening various menus in short order. It seems that not all Windows know what they are,
but at least having it working for menus is quite an improvement already.
made windows become translucent as they are being minimised, making it look a bit fancier. Hacking on KWin is actually a lot of fun. You can do a lot with very little, the code in
most of the effects is (at least partly) easy to understand and modify, and the results
are very visible, which I think is a good motivator.