Is KWin rocket science?

This weekend I played around with adding a slight animation to the BoxSwitch effect when the selection changes and when new windows are opened or existing closed. Here’s the video (sorry for bad quality):

(OGG Video)

The BoxSwitch effect is now animating the selection when pressing Tab. It’s moving instead of jumping as before. Another change is that all thumbnails adept to changes in their geometry when a new window is added or an existing is removed. They slide to the new position instead of just jumping there. Isn’t that elegant?

On this effect I worked together with a new possible KWin developer who does not know anything about OpenGL. So what do you think how many lines of OpenGL code this new animation contains? 100? 50? 10? or maybe 1? No you don’t need to know any OpenGL to write hardware accelerated animations in KWin. The complete animation code is part of the KWin animation framework and the only change to the code is adding a QTimeLine to the changing geometries. It’s currently just playing around but my plans are to add this new implementation into the rendering engine, so that any changing geometries are automatically animated without the effects to need to worry about.

What I want to highlight is that it is really easy to work on KWin. It’s not rocket science and you do not need to know anything about OpenGL to get awesome effects working. Our effect framework completely abstracts the dirty details making it easy for you to write awesome animations fast. There are lots of small things like here the BoxSwitch where improvements are more than welcome. Just come along to the #kwin channel, drop us a mail on kwin@kde.org and have a look to the Plasma Task Wiki page, which will soon be filled with KWin tasks, too.

=-=-=-=-=
Powered by Blogilo

4 thoughts on “Is KWin rocket science?”

  1. nice work with the “BoxSwitch” effect.

    in your article you said that
    “plans are to add this new implementation into the rendering engine”

    which rendering engine do u mean?

    i don’t thing that kwin is a too much difficult project cuz of OpenGL.
    i don’t believe that there are difficult “things”,only “things” with poor documentation.

    the last two months i got involved with the Qt frameworks because i want to contritube for kde and especially for kwin,the only hard thing for me is the luck of documentation which explains
    in which part of kwin opengl is needed?
    what exactly should someone know in order to contibute in the composite section of kwin?

    i am telling you all these because i know that kwin needs developers and with articles like that you try to approach more people..

    i thing that the kwin project should focus more in documentation in order to be more friendly..

    1. where do you think documentation is missing? There are the API docs which are getting better and better, there is my tutorial here in the blog (and also on techbase), there are quite some demo effects in the source directory. And there is always the possibility to ask ;-)

      In order to improve the documentation, I need to know what you are missing.

  2. thanks for answering so fast.

    i can’t be 100% sure for the luck of documentation because i haven’t programm anything kdeish,i only know some qt.

    the kwin api(api.kde.org) explains very good the classed but not the functions listed in each class.
    of course i know that something like that is very difficult since you are only 3 “full”-time developers contributing to kwin.

    when i gave some time and read the HACKING and COMPLIANCE docs in the past but i didn’t understand that the knowledge of OpenGL is not necessary for all parts of kwin.
    one kwin dev told me that decorations use Qt/Kde and only for the composing things the opengl is needed.
    also even reading the above docs i didn’t find much about the “relationship” of opengl with kwin also i came across with terms such as ICCCM,EWMH.glx,glsl,glew,glee,freeglut.
    even now i don’t know the diferrence between EWMH,ICCCM.
    i know that kwin uses them and that glx,EWMH,ICCCM has something to do with the X server but i cannot understand how these 3 are linked together.
    in the beging i thought that kwin uses Qt-opengl stuff which is wrong,the dev also told me that.

    what i want to say is this,everyone knows that kde uses qt libs and that qt is c++,so everyone expects from kwin to use the same tools,which it doesn’t.so digging up and searching for the “relation” of opengl-X11-kwin someone(unexperienced) can become confused.

    i thing that kwin needs a “hello world” doc,it (kwin) has many docs and good one but they don’t aim at the zero-knowledge programmer

    i am an unexperienced programmer(if i can call myself one) and i thing that most of the contributors of kde are like me,so a “hello” doc would make the kwin much more friendly.

Comments are closed.