Yesterday evening just before the hard freeze a nice feature was added to KWin: window decoration painted behind translucent windows. Have a look:

Currently it’s supported by Aurorae, our only translucent decoration, and I think there are no applications yet which use the feature. But as it is proposed as an addition to EWMH I’m sure there will be in future. Somewhere I read that Mozilla Firefox wants to use translucent backgrounds. So that is your solution for the X11 platform.

This weekend I worked on some KWin OpenGL Shaders. That is I wanted to bring back the blur effect. It seems like many users want to have the effect and well with translucent window decorations a nice blur is kind of needed (yes we get compared to Windows 7 and that blur is really well done). The first results look very promising: it’s fast and doesn’t render artifacts to the screen. But I decided to not rush it into 4.4 as there are still some minor glitches around the decoration shadows which render the nice Oxygen glow useless. As well the blurring is not yet as nice as one produced by Krita. I will merge the branch as soon as trunk is open again and so we will have a blur effect in 4.5 again

But blurring is not the only OpenGL shader I started to work on this weekend: I started to implement a shader to replace the complete fixed functionality rendering of KWin. Our current rendering uses lots of OpenGL 1 commands as we also want to support older hardware. We have some OpenGL 2 shaders like the blur which replace parts of the fixed functionality.

In OpenGL 3 the fixed functionality is deprecated, in OpenGL ES 2.0 it’s even completely removed and replaced by the programmable pipeline. So getting the rendering completely into a shader is a prerequisite for using the new awesome stuff of OpenGL 3 like geometry shaders as well for porting KWin to OpenGL ES.

So why porting to OpenGL ES? Well I would like to see KWin running on Hardware like the N900 I think that KWin although developed for the desktop would be a nice window manager for small devices. We have some outstanding effects and a great decoration API as well as a nice SVG decoration engine when you don’t want to write your own decoration. And of course we see that some projects use Clutter based window managers for their small screen systems and it would be nice to provide an alternative, a window manager which is rock solid and has been used with compositing enabled by default for now almost a year – in some distributions already since KDE 4.1. And last but not least optimizing for small devices is useful for desktop systems as well.

So after spending some hours hacking the basic window rendering is implemented in a shader and if the shader is bound no deprecated OpenGL functions are used. Not only the basic rendering is supported, but some effects like present windows, desktop grid or even cover switch (as long as not using multiple screens) work as well. Other effects like cube, all shader effects or important benchmarking tools like fps are completely broken (Nevertheless my completely unprofessional benchmark called “top” looks very promising – kwin is not shown any more when idling or just doing a few repaints).

I don’t know when I will have something that could be shared as my development time is currently very limited and I only work on KWin at weekends. As well for the OpenGL ES part it could be a problem that I don’t have any hardware For OpenGL 3 it’s no problem as the drivers I use support it. I hope to have it in a state to push to trunk when it gets unfrozen.

Desktop Grid uses Present Windows (if activated) to lay out the windows as you might know from the previews of GNOME Shell or Mac OS Spaces. In the not existing video you can see that dragging the windows from one desktop to the other is nice and smooth. As soon as the dragging starts the windows on the starting desktop will be rearranged and the window, which is being moved is, bound to the cursor. When dropping the window onto another desktop the windows start to rearrange immediately.

The Present Windows effect has a proxy which allows other effects to call some of the methods from Present Windows. So Desktop Grid uses the proxy to get the layout for a group of windows. The proxies are also used in other effects, e.g. Sliding Popups disables the Fade animation and CoverSwitch uses a proxy to get the thumbnail bar from BoxSwitch.

Other goodies from Present Windows like filtering or mouse actions are not used. Therefore the effects have to be merged to become the one effect to rule them all. (Yes The Lord of the Rings is currently again the book on my bedside table.)